jquery.i18n.properties.js 文件下载可查看
https://download.csdn.net/download/qq_37541486/12837911
结果预览
1.引入jquery
2.引入jquery.i18n.properties.js
3.创建common_zh.properties和common.properties文件
( 如果使用 common.properties文件英文没反应,可以修改为common_en.properties)
##common_zh.properties
Contact = 联系我们
Contact1 = 注册问题,请查阅 <a>用户支持页面</a>.
##common.properties
Contact = Contact
Contact1 = For questions regarding user registration<br/> please see <a>our user page</a>.
html中的使用
- data-i18n-text=“Contact” (普通标签的多语言写法)
- data-i18n-placeholder=“Contact” ( 表单类的 placeholder的多语言写法)
- data-i18n-text_call=“Contact1” (带标签的多语言写法)
- data-i18n-value
- data-i18n-title
js中的使用
- $.i18n.prop(‘Contact1’)
代码示例
<!-- 通过 data-i18n-text="“为标签赋值 -->
<div id="timeType">
<label class="itemLabel radio-inline"><input type="radio" name="Resolution" value="y"/> <span data-i18n-text="AnnualAvg"></span></label>
<label class="itemLabel radio-inline"><input type="radio" name=