在我的 Android 应用程序中实现传统和简体中文支持的过程中,我对这个应该如何工作感到困惑。
因此,从阅读 < a href = “ http://developer.android.com/resources/Tutorials/location/index.html”rel = “ norefrer”> 文档中可以看出 以及一些像 这个和 这个这样的讨论,我已经投入了简体中文
中国传统文化
这一切工作正常,但不知何故没有意义对我来说(抱歉,如果我不理解足够的中国简体与传统用法)。
根据我在模拟器和植入式手机上检查区域设置对话框的理解,用户可以将区域设置更改为简体中文或繁体中文。
现在问题来了。系统如何知道从哪里获得简化的或传统的中文 strings.xml。是否存在某种假设,假设我应该显示简体中文,从值 zh 中得到它,从值 zh-rtW 中得到传统值?
但是,如果用户位于香港,并将他的设备设置为显示简体中文,该怎么办呢?或者,如果一个移民在世界其他地方设置他的设备传统中文,但他的地区是如美国或加利福尼亚州?
我需要做些什么来允许我的用户设置他们的语言环境,并让我的应用程序以正确的语言环境出现?
更新:
根据进一步的调查,我认为 Android 手机用户不能将国家与语言分开。它们只能在 UI 中设置所谓的区域设置。它由语言和国家组成,但列表是有限的,因此许多组合是不可能的。
例如,一个生活在美国的中国人如果想使用繁体中文,可以将该语言设置为繁体中文(至少在一个固定的电话上) ,然后就会有一个 zh-rTW 的地区。他决不能把自己的国家单独设定为国家。以同样的方式,任何移民都不能将他们的母语与他们目前居住的国家联系起来。.
基本上,这意味着只支持一系列语言和国家的组合。现在的问题是如何找出它们是哪些?