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
Do android support multiple languages?
提问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 values
directory for the language with the suffix of the language code. For german: values-de
or french: values-fr
than 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 文件中。