[Java教程]jQuery.i18n.properties实现前端国际化
0 2015-11-18 11:00:04
jQuery.i18n.properties的下载地址:
jquery.i18n.properties-1.0.9.js:下载地址:http://download.csdn.net/detail/snails_zx/9224023
jquery.i18n.properties-min-1.0.9.js:下载地址:http://download.csdn.net/detail/snails_zx/9224023
新建2个文件
strings.properties
strings_zh.properties
内容分别为
strings.propertiesuser=user name pwd = password
strings_zh.propertiesuser=用户名 pwd = 密码
关键代码jQuery.i18n.properties({ name : 'strings', //资源文件名称 path : '/i18n/', //资源文件路径 mode : 'map', //用Map的方式使用资源文件中的值 language : 'zh', callback : function() {//加载成功后设置显示内容 alert($.i18n.prop('user')); alert($.i18n.prop('pwd')); } });
本文网址:http://www.shaoqun.com/a/159649.html
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:admin@shaoqun.com。
jquery
0