flex使用翻译串流程
== 翻译串流程 ==
如果在本地进行翻译串编译,首先要下载gettext-0.14.4,安装
配置环境变量:在系统配置 path下增加" ;D:\Program Files\GnuWin32\bin"
翻译串文件位置:\app\locale\zh_CN.pot
翻译串文件编译后位置:\app\locale\zh_CN\LC_MESSAGES\default.mo
在zh_CN.pot中翻译串文件格式,msgid为原始翻译串,msgid为中文翻译,
如:
msgid "Login"
msgstr "登录"
使用命令行进行编译
msgfmt --output-file=zh_CN\LC_MESSAGES\default.mo zh_CN.pot
Flex翻译串流程:
import com.captech.utils.GetText;
GetText._('Login');
如此在加载zh_CN.pot编译后的default.mo之后,即可将"Login"替换为"登录"
猜你喜欢
转载自hgfghwq10.iteye.com/blog/1572350
今日推荐
周排行