How to integrate multi-languages in a React Native projects [closed]

混江龙づ霸主 提交于 2020-01-23 10:01:48

问题


I want to develop an app in react native, with support to multi-languages like English, Turkish,... what are you suggest to me?


回答1:


Use react-native-localize to add the ability of multiple language support.

You can use react-native-localize with I18n-js (but also with react-intl, react-i18next, etc. The choice is yours!)

⚠️ Deprecated:

We can use an internationalization module named react-native-i18n to add many languages in our React Native projects.

Install the following module to link with your project.

npm i react-native-i18n --save

For more details, please go through How to add localization (i18n, g11n) and RTL support to a React Native project.




回答2:


Recently react-native-i18n has been deprecated in favor of react-native-localize.

If you use react-native-i18n, migrating to react-native-localize with i18n-js is really easy.

Here is a post where you can read if you want to migrate from react-native-i18n or implement the new react-native-localize.

Click here

Good coding!




回答3:


You can use react-native-languages, For more details kindly follow this link:https://github.com/react-community/react-native-languages, It's core is i18n-js, so you can get all the necessary methods.



来源:https://stackoverflow.com/questions/52789527/how-to-integrate-multi-languages-in-a-react-native-projects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!