如何创建多语言安卓应用程序? [英] How can I create a multilingual android application?

查看:21
本文介绍了如何创建多语言安卓应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个多语言的 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

这篇关于如何创建多语言安卓应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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