【问题标题】:How to convert .po to .mo files via CentOS command line?如何通过 CentOS 命令行将 .po 转换为 .mo 文件?
【发布时间】:2018-07-17 10:54:41
【问题描述】:

我的 CentOS 服务器中有 .po 和 .mo 文件。我用vi编辑.po文件后,有没有办法通过命令行把它转换成.mo?

附:请考虑 CentOS,谢谢。

【问题讨论】:

  • 仅供参考,这是gettext 格式。

标签: linux centos


【解决方案1】:

在基于 deb 的发行版中:apt-get install gettext

我认为 centos 中也有类似的东西。

然后可以使用:

msgfmt messages.po -o messages.mo

【讨论】:

  • 您可以使用poedit 软件编辑您的.po 文件,并使用它自动将其转换为.mo。该软件是多平台的。
【解决方案2】:

在 CentOS 中

sudo yum install gettext

然后

msgfmt messages.po -o messages.mo

【讨论】:

    猜你喜欢
    • 2011-04-05
    • 2012-06-07
    • 2015-08-17
    • 2013-06-09
    • 1970-01-01
    • 2015-07-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多