Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
wordpress主题翻译.po/.mo_Wordpress_Translation_Po - Fatal编程技术网

wordpress主题翻译.po/.mo

wordpress主题翻译.po/.mo,wordpress,translation,po,Wordpress,Translation,Po,我正在尝试用.po文件翻译自定义主题。 我发现主题本身已经为翻译做好了准备(have和example.po和.mo文件,并调用load\u theme\u textdomain(kopa\u get\u domain(),get\u template\u directory()。/languages');函数 我试着用404页面用以下字符串测试它: ?php _e( "We're sorry, but we can't find the page you were looking for. It

我正在尝试用.po文件翻译自定义主题。 我发现主题本身已经为翻译做好了准备(have和example.po和.mo文件,并调用
load\u theme\u textdomain(kopa\u get\u domain(),get\u template\u 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"

但是页面上没有任何更改。可能是什么问题?

我尝试了
加载textdomain(kopa\u get\u domain(),get\u template\u directory()。/languages/en\u US.mo')
也没有更改。函数返回“1”