`
小熊2号
  • 浏览: 14650 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Titanium国际化支持中文语言包zh_Hans和zh_CN

阅读更多
Titanium的国际化支持还可以,但是官方文档对于如何支持中文并没有写得很清楚:
https://wiki.appcelerator.org/display/guides/Internationalization

我在i18n目录下把中文文件夹名字设置为zh,不行。有网友把文件夹名字设置为zh_CN可以工作,http://www.tidevcn.com/forum.php?mod=viewthread&tid=590,但是我这样做了以后还是不行。

费了一点周折,通过Titanium.Locale.currentLanguag读到语言名称竟然是:zh_Hans

把zh或者zh_CN改为zh_Hans就能工作了。

在标准ISO-639-1中也查不到zh_Hans,尚未清楚是什么情况。

Titanium SDK: 2.0.2
iPhone Simulator: IOS 5.0

2012.6.15更新:
在Mac得iPhone Simulator上是zh_Hans
在iPhone4S真机上是zh_CN
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics