我为214主题创建了一个儿童主题,我也在忙着将其翻译成南非荷兰语。我已经给文件命名了
pietergoosen-af\\U af.po
并将其放入语言文件中,我已将以下内容添加到各自的文件函数中。php和wp配置。php
function pietergoosen_language_file_registration() {
load_child_theme_textdomain( \'pietergoosen\', get_stylesheet_directory() . \'/languages\' );
}
add_action( \'after_setup_theme\', \'pietergoosen_language_file_registration\' );
以及
define(\'WPLANG\', \'af_AF\');
我翻译的所有插件都显示了南非荷兰语,但我的主题不是。我已经在这个网站上查看了所有的教程和答案,但无法让它正常工作。为了提供帮助,这里是我的样式表和po文件的标题
/*
Theme Name: pietergoosen
Theme URI: http://pietergoosen.com
Description: Spesiaal geskep deur Pieter Goosen vir sy webtuistes.
Author: Pieter Goosen
Author URI: http://pietergoosen.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: twentyfourteen
Version: 1.0
*/
@import url("../twentyfourteen/style.css");
以及
msgid ""
msgstr ""
"Project-Id-Version: Pieter Goosen v1.0\\n"
"POT-Creation-Date: 2014-02-03 19:25+0200\\n"
"PO-Revision-Date: 2014-02-03 21:32+0200\\n"
"Last-Translator: Pieter Goosen <[email protected]>\\n"
"Language-Team: Private <[email protected]>\\n"
"Language: af\\n"
"MIME-Version: 1.0\\n"
"Content-Type: text/plain; charset=UTF-8\\n"
"Content-Transfer-Encoding: 8bit\\n"
"X-Generator: Poedit 1.5.5\\n"
"X-Poedit-KeywordsList: gettext;gettext_noop;__;_e;_n:1,2;_x:1,2c;_ex:1,2c\\n"
"X-Poedit-Basepath: .\\n"
"Plural-Forms: nplurals=2; plural=n != 1;\\n"
"X-Poedit-SourceCharset: UTF-8\\n"
"X-Poedit-SearchPath-0: ..\\n"
#: ../404.php:17
msgid "Not Found"
msgstr "Niks gevind"
这是我的pietergoosen的头球。锅和第一串
msgid ""
msgstr ""
"Project-Id-Version: Pieter Goosen v1.0\\n"
"POT-Creation-Date: 2014-02-03 19:19+0200\\n"
"PO-Revision-Date: 2014-02-03 19:22+0200\\n"
"Last-Translator: Pieter Goosen <[email protected]>\\n"
"Language-Team: Private <[email protected]>\\n"
"MIME-Version: 1.0\\n"
"Content-Type: text/plain; charset=UTF-8\\n"
"Content-Transfer-Encoding: 8bit\\n"
"X-Generator: Poedit 1.5.5\\n"
"X-Poedit-KeywordsList: gettext;gettext_noop;__;_e;_n:1,2;_x:1,2c;_ex:1,2c\\n"
"X-Poedit-Basepath: ..\\n"
"Plural-Forms: nplurals=2; plural=n != 1;\\n"
"Language: English\\n"
"X-Poedit-SourceCharset: UTF-8\\n"
#: ../404.php:17
msgid "Not Found"
msgstr ""