I wrote a plugin that goes through all my locale files and combine them into a single json file per locale, where each key follows the directory structure.

scenes/Home/locales/en.json has some locales:

The plugin generates a file per locale, /public/locales/en.json that I download when the app boots, which looks like this:

Then using React-Intl, I inject the content to the IntlProvider and use it that way:



Front-end Application Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store