问题描述
我想创建一个多语言的 android 应用程序.
I would like to create a multilingual android application.
有没有办法检测用户喜欢什么语言?
Is there a way to detect what language the user prefers?
是否有推荐的方法来管理 Android 上的多种语言,或者我应该重新发明轮子?
Is there a recommended way to manage multiple languages on Android or should I reinvent the wheel?
推荐答案
是的,有一种管理多语言的推荐方法
Yes, there is a recommended way to manage multiple languages
多语言支持很容易为 android 完成.使用语言代码的后缀为该语言创建一个新的值目录.对于德语:values-de 或法语:values-fr,而不是将您的 string.xml 复制到其中并翻译每个条目.这就是你所需要的.
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 string.xml into that and translate each entry. Thats all you need.
android 支持多种语言吗?
如果您遵循建议,则自动检测用户喜欢哪种语言.
Providing you follow the recommendations, detecting which language the user prefers is automatic.
读一读:
http://developer.android.com/guide/topics/resources/本地化.html
这篇关于如何创建多语言安卓应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)