jQuery.i18n.properties实现前端国际化
2015-11-18 10:01
405 查看
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.properties
strings_zh.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.properties
user=user name pwd = password
strings_zh.properties
user=用户名 pwd = 密码
关键代码
jQuery.i18n.properties({ name : 'strings', //资源文件名称 path : '/i18n/', //资源文件路径 mode : 'map', //用Map的方式使用资源文件中的值 language : 'zh', callback : function() {//加载成功后设置显示内容 alert($.i18n.prop('user')); alert($.i18n.prop('pwd')); } });
相关文章推荐
- jquery区分苹果浏览器和安卓浏览器
- jQuery bind and unbind (绑定和解除)
- jquery ui 页面布局多个table,多个tab,earyui-datagid的fit失效,中间的table格式不对齐
- jQuery EasyUI使用教程之创建标签页
- 改进网站设计的免费jQuery插件Top 7
- jquery操作json数组的实现代码及常用函数
- jquery ui tab 去除outline
- jquery增加,移除,修改一个html标签的class名字。
- jquery的load()方法加载html后javascript失效解决方法
- 如何使用jquery easyui创建标签组件
- jQuery EasyUI 布局之动态添加tabs标签页
- jQuery EasyUI 菜单与按钮之创建简单的菜单和链接按钮
- Jquery Mobile 自定义按钮图标
- z-blog SyntaxHighlighter 长代码无法换行解决办法(基于jquery)
- jquery 轮播图滚动效果
- Django1.7+JQuery+Ajax集成小例子
- jquery 中的事件冒泡
- 【jQuery】Ajax函数:$.get(),$.post(),$.ajax(),$.getJSON()
- JQuery:cookie插件
- 【jQuery】slideUp()和slideDown()函数