[英]How to localize app name in React Native?
How to localize app name in bare React Native app project?如何在裸 React Native 应用程序项目中本地化应用程序名称? I updated app name in
strings.xml
at android/src/main/res/values/strings.xml
and <string name="app_name">New App Name</string>
.我在
strings.xml
at android/src/main/res/values/strings.xml
和<string name="app_name">New App Name</string>
更新了应用名称。
Likewise, in iOS I changed display name in Xcode and updated CFBundleDisplayName
value in info.plist
, but how do I localize app name based on selected device language and is it possible to localize app name from Redux store?同样,在 iOS 中,我更改了 Xcode 中的显示名称并更新了
info.plist
中的CFBundleDisplayName
值,但是如何根据所选设备语言本地化应用程序名称,是否可以从 Redux 商店本地化应用程序名称?
Thank you in advance先感谢您
This article contains a thorough explanation of how this works for ios: https://hackernoon.com/localize-an-application-name-in-react-native-c36c4b2be7c3本文详细解释了 ios 的工作原理: https://hackernoon.com/localize-an-application-name-in-react-native-c36c4b2be7c3
As for Android, it's just about creating a file under android/app/src/main/res/ copy the file under values/strings.xml put it under ur language-region specification ex.至于 Android,它只是在 android/app/src/main/res/ 下创建一个文件,复制 values/strings.xml 下的文件,把它放在你的语言区域规范下。 values-en-rUS/strings.xml and then change the app name in there
values-en-rUS/strings.xml 然后更改其中的应用程序名称
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.