有什么方法可以使用expo根据本机中的电话语言来翻译上下文菜单吗? [英] Is there any way to translate context menu according to phone language in react-native using expo?
问题描述
因此,我使用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
我们在以下方面遇到了同样的问题:如何在对本地人有反应?
We have the same problem with: How to translate context menu in react native?
但是我在expo中使用react-native.
but I'm using react-native with expo.
谢谢.
推荐答案
添加到app.json:
Add to app.json:
-
添加空的本地化文件(语言环境":{"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根据本机中的电话语言来翻译上下文菜单吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!