我试图用.po文件翻译自定义主题。
我发现主题本身已经准备好进行翻译了(有例子.po和.mo文件以及调用load_theme_textdomain(kopa_get_domain(), get_template_directory() . '/languages');
函数。
我试图用404这个字符串测试它:
?php _e( "We're sorry, but we can't find the page you were looking for. It's probably some thing we've done wrong but now we know about it we'll try to fix it. In the meantime, try one of these options:", kopa_get_domain() ); ?>
我在.po中找到它并添加了测试翻译:
msgid "We're sorry, but we can't find the page you were looking for. It's probably some thing we've done wrong but now we know about it we'll try to fix it. In the meantime, try one of these options:"
msgstr "sadasf"
但页面上没有任何变化。可能是什么问题?