如何在React Native项目中集成多语言 [英] How to integrate multi-languages in a React Native projects
问题描述
我想开发一个以本机响应的应用程序,并支持英语,土耳其语,...等多语言. 你对我有什么建议?
I want to develop an app in react native, with support to multi-languages like English, Turkish,... what are you suggest to me?
推荐答案
使用 react-native-localize 以添加多语言支持的功能.
Use react-native-localize to add the ability of multiple language support.
您可以将 react-native-localize 与 I18n-js (但也可以使用react-intl,react-i18next等.选择由您选择! )
You can use react-native-localize with I18n-js (but also with react-intl, react-i18next, etc. The choice is yours!)
⚠️不推荐使用:
我们可以使用名为react-native-i18n
的国际化模块在我们的React Native项目中添加多种语言.
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.
这篇关于如何在React Native项目中集成多语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!