I created a child theme for the twentyfourteen theme which I'm also busy translating into Afrikaans. I've named the file
pietergoosen-af_AF.po
and placed it into the languages file and I've added the following into my respective files functions.php and wp-config.php
function pietergoosen_language_file_registration() {
load_child_theme_textdomain( 'pietergoosen', get_stylesheet_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'pietergoosen_language_file_registration' );
and
define('WPLANG', 'af_AF');
All the plugins I've translated shows the Afrikaans words, but my theme not. I've checked out all tutorials and answers on this site, but can't get the thing to work. To assist, here are the headers for my stylesheet and po file
/*
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");
and
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"
Here is the header for my pietergoosen.pot and the first string
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 ""