Python 国际化 i18n
gettext 介绍
gettext 是一套 GNU 下的国际化工具。主要有工具:
- xgettext: 从源码中抽取字符串,生成 po 文件(portable object)
- msgfmt: 将 po 文件编译成 mo 文件(machine object)
- gettext: 进行翻译
po 文件编译成 mo 文件
msgfmt locale/zh_Hans_CN/LC_MESSAGES/messages.po -o locale/zh_Hans_CN/LC_MESSAGES/messages.mo最近更新
最新评论