/locize-remix-i18next-example

simple example of how to use remix-i18next with remix and locize

Primary LanguageJavaScript

locize example: remix-i18next

What is this?

This is a simple example of how to use remix-i18next with Remix and locize to get translations up and running quickly and easily.

This is the example app used in this blog post.

For more info...

You may have arrived here from the Remix repository, or the react-i18next repository. Either way, for more documentation, please visit the main README.

How to integrate locize

Since Remix apps are usually deployed on serverless environments, we will use the i18next-locize-backend plugin only on client side.

Instead on server side we'll "bundle" the translations first. See downloadLocales script in package.json. We're doing so to prevent an elevated amount of downloads. Read this for more information about this topic about serverless environments.

Before "deploying" your app, you can run the downloadLocales script (or similar), which will use the cli to download the translations from locize into the appropriate folder remix-i18next is looking in to (i.e. ./public/locales). This way the translations are bundled in your app and on server side you will not generate any downloads to the locize CDN during runtime, but just on client side.