【问题标题】:How to refere to .po/.pot files in website code?如何在网站代码中引用 .po/.pot 文件?
【发布时间】:2019-03-26 15:01:48
【问题描述】:

我想用 po 文件翻译我的页面。不幸的是,我不知道应该如何在代码中引用 .po 文件。 网站已经用 php/html 和 wordpress 命令编写。

【问题讨论】:

    标签: php html wordpress po


    【解决方案1】:

    Packagist 上有很多库可以处理.po 文件中的gettext 翻译。这只是其中之一:

    https://packagist.org/packages/gettext/gettext

    只需要与作曲家一起使用。当然,可能有使用这些库的 wordpress 插件,这可能更容易设置。

    这里是 wordpress 的 i18n 文档,其中提到了 .po 文件的用法

    https://codex.wordpress.org/I18n_for_WordPress_Developers#PO_files

    【讨论】:

      猜你喜欢
      • 2011-06-08
      • 2012-04-22
      • 2020-01-18
      • 1970-01-01
      • 1970-01-01
      • 2015-11-25
      • 1970-01-01
      • 2011-12-03
      • 2012-01-16
      相关资源
      最近更新 更多