This is a basic sample using locize with react-intl.
- splitting translations into multiple files
- incontext editor
- loading translations from locize CDN
- detection of user language
- automatically add new missing strings to your translation project
- update changed strings in reference language
- submit of description to context
- setting last used information so you can savely remove keys not used any longer
- Create an user account and create a project at https://locize.com and copy your projectId and API key (found in project -> settings) to the variables in
Important: make sure you toggle the publish format for your project to
json flat and have the i18n format set to
icu / messageformat! To match react-intl format of json when downloading.
npm i && npm startand
http://localhost:3000should open automatically.
Refresh your browser window with your locize project to see the newly added strings.
http://localhost:3000/?locize=true to show the incontext editor -> click a text fragment to edit it in locize
Add an additional language translate it using the locize UI. Open
http://localhost:3000/?lng=de to eg. open app with english language. (Attention the call for supported languages is cached for performance reasons and might take 1 hour to reflect the newly added language support!).
For implementation details see comments in