Demonstrates how react-translations and babel-plugin-extract-text can be used to provide a complete and simple gettext style translation solution for React that works both on the client and the server.
(react-translations)
- The use of different APIs
- Server loading of translations for server rendering on boot
- Client rehydration of translations for client rendering
- Basic locale detection middleware
- Middleware that determines which translations to pass to client for rehydration
(babel-plugin-extract-text)
- Gulp task for extraction of strings to a
PO
- Gulp task for converting a
PO
intoJSON
to be used with react-translations
yarn install & yarn run import & yarn run build
yarn start
yarn run export