Android 安卓支持多国语言吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3626976/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 11:03:26  来源:igfitidea点击:

Do android support multiple languages?

androidmultilingual

提问by Ganesh

If i run my android application with a htc magic with locale English, I find my application running properly and if i try to run it on Motorola droid with locale korean, My application(apk) is not even installing on the device. Does android support different language? Is it is because of different language OS versions?

如果我用 htc magic 和语言环境英语运行我的 android 应用程序,我发现我的应用程序运行正常,如果我尝试在摩托罗拉 droid 上使用语言环境运行它,我的应用程序(apk)甚至没有安装在设备上。android 是否支持不同的语言?是因为不同语言的操作系统版本吗?

回答by WarrenFaith

Multilanguage support is easy done for android. Create a new valuesdirectory for the language with the suffix of the language code. For german: values-deor french: values-frthan copy your strings.xml into that and translate each entry. Thats all you need.

android 的多语言支持很容易完成。values为带有语言代码后缀的语言创建一个新目录。对于德语:values-de或法语:然后values-fr将您的 strings.xml 复制到其中并翻译每个条目。这就是你所需要的。

回答by nacho

There is the table of values to add in yours values folder. iso639-2

有值表要添加到您的值文件夹中。 iso639-2

ex: if you like translate your app to spanish you must create a new folder in your res folder called, values-es, and copy inside string.xml file tranlated.

例如:如果您想将您的应用程序翻译成西班牙语,您必须在您的 res 文件夹中创建一个名为 values-es 的新文件夹,并复制到已翻译的 string.xml 文件中。