jquery.i18n.properties使用小记

http://blog.sina.com.cn/s/blog_5919afb30100fw84.html

项目主页: https://code.google.com/p/jquery-i18n-properties/

一直在寻找js的i18n解决方案,今天使用了一下jquery.i18n.properties觉得很不错,向大家推荐一下。

在jquery.1.3.2下调试过程

1、在js/i18n/目录下创建message.properties,message_zh_CN.properties,message_en_US.properties三个文件,推荐使用eclipse下的插件resourcebundleeditor编辑文档,文档存为ISO-8859-1或utf-8.
英文文件中插入
msg_hello = Hello
msg_world = World
msg_complex = Good morning {0}!
中文同上就不写了。
2、在使用前初始化jquery.i18n.properties。

使用心得:
建议使用工具编辑i18n文件,方便。
为了获得最好的兼容性,还是使用map方式访问吧