Is there any way to translate context menu according to phone language in react-native using expo?(有没有办法在使用 expo 的 react-native 中根据电话语言翻译上下文菜单?)
问题描述
所以我使用 i18n 库来本地化我的应用程序的语言并且没有问题,除了仅在 iOS 中的上下文菜单中.即使我已经改变了像日语这样的语言,它总是会显示像英语这样的(选择、全选等)
So I use i18n library to localize my app's languages and theres no problem about it, except in context menu only in iOS. Even though I already change the language like Japanese it will always show English like (Select, Select All, etc.)
https://user-images.githubusercontent.com/47558402/66972776-41d34100-f0c8-11e9-850c-a2aa6b913782.png
我们有同样的问题:如何翻译上下文菜单反应原生?
但我在 expo 中使用 react-native.
but I'm using react-native with expo.
谢谢.
推荐答案
添加到app.json:
Add to app.json:
添加空的本地化文件(https://docs.expo.io/versions/latest/distribution/app-stores/#localizing-system-dialogs-on-ios):
语言环境":{"zh": "./languages/zh.json",ru":./languages/ru.json"},
"locales": { "zh": "./languages/zh.json", "ru": "./languages/ru.json" },
和
2.
"ios": {
"infoPlist": {
"CFBundleLocalizations" : ["zh", "ru"],
"CFBundleDevelopmentRegion" : "zh"
}
}
这篇关于有没有办法在使用 expo 的 react-native 中根据电话语言翻译上下文菜单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:有没有办法在使用 expo 的 react-native 中根据电话语言翻译上下文菜单?


- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01