React / Redux and Multilingual (Internationalization) Apps - Architecture

后端 未结 7 1347
挽巷
挽巷 2020-12-04 04:43

I\'m building an app that will need to be available in multiple languages and locales.

My question is not purely technical, but rather about the architecture, and th

7条回答
  •  伪装坚强ぢ
    2020-12-04 05:10

    If not yet done having a look at https://react.i18next.com/ might be a good advice. It is based on i18next: learn once - translate everywhere.

    Your code will look something like:

    {t('simpleContent')}
    Hello {{name}}, you have {{count}} unread message. Go to messages.

    Comes with samples for:

    • webpack
    • cra
    • expo.js
    • next.js
    • storybook integration
    • razzle
    • dat
    • ...

    https://github.com/i18next/react-i18next/tree/master/example

    Beside that you should also consider workflow during development and later for your translators -> https://www.youtube.com/watch?v=9NOzJhgmyQE

提交回复
热议问题