WordPress 多语言支持中 .mo .po 文件的相互转换

最近在折腾一个 WordPress 的插件,看了下多语言的部分都是 .mo 以及 .po 的语言文件,其中 .po 是文本文件可以直接编辑,.mo 则不可直接编辑识别。Google 后得知,用 msgfmt / msgunfmt 工具可以互相转换,这两个工具都属于 gettext 包,用 apt 安装即可。

aptitude install gettext

使用也非常简单。

po –> mo:

msgfmt zh_CN.po -o zh_CN.mo

mo –> po:

msgunfmt zh_CN.mo -o zh_CN.po
This entry was posted in 电脑相关 and tagged . Bookmark the permalink.

1 Response to WordPress 多语言支持中 .mo .po 文件的相互转换

  1. Pingback: Tweets that mention WordPress 多语言支持中 .mo .po 文件的相互转换 | gkp's post -- Topsy.com

Leave a Reply

Your email address will not be published.