wordpress - PO 文件未翻译
问题描述
我刚刚用 POEDIT 创建了 po 和 mo 文件,但没有翻译。
我的 .po 文件
#: index.php:23
msgid "This is Eng content"
msgstr "This is UK content"
我的 index.php 文件
_e('This is Eng content','custom');
我的功能
function custom_theme_setup() {
load_theme_textdomain( 'custom', get_template_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'custom_theme_setup');
我不知道什么是错误。非常感谢 。
解决方案
推荐阅读
- mysql - 关联名称蜘蛛网
- python - 从 Python 访问 firebird,提交后无法发送新命令
- android - NDK 从 20.1 升级到 21.0 后 Android 应用崩溃
- excel - 无法在第三张工作表中填充唯一值,将第二张工作表的值与第一个工作表的值进行比较
- php - odbc_execute(): 提供的资源不是使用 PHP 的有效 ODBC 结果资源
- r - 如何在 R 中对我的数据使用方程式?
- python - 使用 LDA 输出追加/合并数据帧
- excel - 如何查找上一个可见行的行号
- python - xlsxwriter 错误:AttributeError:“工作簿”对象没有属性“add_format”
- github - 将更改应用到两个 Git 分支(发布分支和开发)的最佳实践