如何在React Native中翻译上下文菜单? [英] How to translate context menu in react native?

查看:107
本文介绍了如何在React Native中翻译上下文菜单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从事一个需要翻译成多种语言的项目.我正在使用Zanata来翻译所有内容,除了上下文菜单外,它都可以工作.我在官方文档中找不到如何翻译的任何内容.不管我在手机上设置了哪种语言,它将始终在上下文菜单中显示英语(复制,全选,粘贴..)

I am working on a project that requires to be translated on multiple languages. I am using Zanata to translate everything and it works except context menu. I can not find anything in official documentation how to translate it. Regardless of language that I set on the phone it will always show english language in context menu(copy, select all, paste..)

未翻译的上下文菜单示例

我认为它将由操作系统自动完成,但事实并非如此.有谁有同样的问题,对此有什么解决方案吗?

I thought that it will be done automatically by operating system but it is not. Does anyone has the same problem and is there any solution for this?

谢谢.

推荐答案

对于iOS,您需要在Xcode Project设置中添加受支持的本地化语言.

For iOS, you need to add the supported localization languages in Xcode Project settings.

如果设备语言与这些语言之一匹配,则系统将以该语言显示工具提示.据我所知,实际的字符串不能更改.

If the device language matches one of these languages, the system will show the tooltips in that language. The actual strings, as far as I'm aware, cannot be changed.

此外,您可以定义

Additionally, you can define a CFBundleDevelopmentRegion value in your Info.plist to define a default language.

这篇关于如何在React Native中翻译上下文菜单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆