jQuery.i18n.properties是一款轻量级的jQuery国际化插件,能实现Web前端的国际化。
国际化英文单词为:Internationalization,又称i18n,“i”为单词的第一个字母,“18”为“i”和“n”之间单词的个数,而“n”代表这个单词的最后一个字母。jQuery.i18n.properties采用.properties文件对JavaScript进行国际化。jQuery.i18n.properties插件首先加载默认的资源文件(strings.properties),然后加载针对特定语言环境的资源文件(strings_zh.properties),这就保证了在未提供某种语言的翻译时,默认值始终有效。
官方地址:https://code.google.com/archive/p/jquery-i18n-properties/
官方github地址:https://github.com/jquery-i18n-properties/jquery-i18n-properties
实现步骤,
第一步:下载JS插件
jquery.i18n.properties.js
第二步
编写前端页面