-
Notifications
You must be signed in to change notification settings - Fork 855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it i18n friendly #650
Comments
Yes we used react-intl in js.ipfs.io mainly because it's made for react and supports:
The strategy we went for was to have a intl folder that containes everything related to i18n. Contributors just need to follow a few steps to add a new language, which are detailed in the README. Note that ideally, you would lazy load the locale files. More specifically, you should only call addLocaleData when a language is requested. Moreover, if you use nested messages for readability, be sure to flat the messages object because nesting is not supported. You may use https://github.com/IonicaBizau/obj-flatten to flatten the messages. I think that's all, feel free to ask more questions and I will happily provide help. |
This comment has been minimized.
This comment has been minimized.
Some relevant notes: https://github.com/ipfs/i18n#adding-i18n-to-your-project |
I can add it on the PR I'm working on. It's not that much 😄 |
@hacdias as long the change set is not too big. (Would be cool to have it in separate PR, so we can link to it as an example for other projects that want to add i18n) |
@satazor implemented this for js.ipfs.io using react-intl and it is super easy to work with. @satazor, wanna shine some light here?
The text was updated successfully, but these errors were encountered: