Community Forums › Forums › Internationalization and Translations › loading call for the textdomain
Tagged: genesis init line, textdomain
- This topic has 7 replies, 3 voices, and was last updated 11 years, 2 months ago by Roeland.
-
AuthorPosts
-
January 29, 2013 at 4:11 pm #16151RoelandMember
Hi I'am Roeland,
And i'am trying to translate the agentpress theme.
David Decker said on the old forum
That's because search results are handled by the theme template files. So you have to use translation files for the AgentPress child theme as well!
It's prepared for translation but has no loading call for the textdomain. You can add that yourself to functions.php file (backup file before!):
PHP Code:
/** Localization */
load_child_theme_textdomain( 'agentpress', get_stylesheet_directory() . '/lib/languages' );
-> place directly after genesis init line
-> create a subfolder wp-content/themes/agentpress/lib/languages/
-> place your language files there as: nl_NL.mo and nl_NL.poI have created the folder, and the mo an po files. But i don't know where to place te PHP Code: What is the genesis init line in the functions.php?
January 29, 2013 at 5:30 pm #16196SoZoMemberThe init line he is referring to is at the top of functions.php
<?php /** Start the engine */ require_once( get_template_directory() . '/lib/init.php' );
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 30, 2013 at 3:43 am #16352RoelandMemberTank you so much John!
I have yet placed it there, But unfortunately it still doesn't work. Do you have any idea what i do wrong?
<?php
/** Start the engine */
require_once( get_template_directory() . '/lib/init.php' );/** Localization */
load_child_theme_textdomain( 'agentpress', get_stylesheet_directory() . '/lib/languages' );/** Create additional color style options */
add_theme_support( 'genesis-style-selector', array( 'agentpress-gray' => 'Gray', 'agentpress-green' => 'Green', 'agentpress-red' => 'Red', 'agentpress-tan' => 'Tan' ) );/** Child theme (do not remove) */
define( 'CHILD_THEME_NAME', 'AgentPress Theme' );
define( 'CHILD_THEME_URL', 'http://www.studiopress.com/themes/agentpress' );$content_width = apply_filters( 'content_width', 600, 430, 920 );
I'am using a dutch wordpress version and in wp-config.php is writtesn
define('WPLANG', 'nl_NL')
This is how i made the folders.
www/wp-content/themes/agentpress/lib/languages/agentpress-nl_NL.mo
www/wp-content/themes/agentpress/lib/languages/agentpress-nl_NL.poCan there be something wrong with the translation?
Below a part of the translation
msgid ""
msgstr ""
"Project-Id-Version: AgentPress Two Child Theme 2.x for Genesis Framework\n"
"Report-Msgid-Bugs-To: http://www.studiopress.com/support/forumdisplay.php?"
"f=188\n"
"POT-Creation-Date: 2011-09-27 12:03+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Roeland van Spijk <[email protected]>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
"X-Textdomain-Support: yes\n"
"X-Generator: Poedit 1.5.4\n"
"X-Poedit-SearchPath-0: .\n"# @ agentpress
# @ apl
#: archive-listing.php:33 functions.php:111 taxonomy.php:33
msgid "View Listing"
msgstr "Bekijk Aanbod"# @ apl
#: functions.php:75
msgid "Price:"
msgstr "Prijs:"# @ apl
#: functions.php:76
msgid "Address:"
msgstr "Adres:"# @ apl
#: functions.php:77
msgid "City:"
msgstr "Plaats:"# @ apl
#: functions.php:78
msgid "State:"
msgstr "Provincie:"January 30, 2013 at 3:49 am #16354Remkus de VriesMemberThe AgentPress theme is already translated to Dutch.
Translate the Genesis Framework with the Genesis Translations plugin.
January 30, 2013 at 4:15 am #16357RoelandMemberHoi Remkus,
You are great! Tanks.
Now i have placed your translation via FTP in the translations folder. But it is still not translated.
Do you have any suggestions?
Groeten Roeland.
Yesterday i have read your blog. Now i never want to eat kipnuggets again:)
January 30, 2013 at 3:53 pm #16518RoelandMemberHi John and/or Remkus,
I don't know what i do wrong, but my agentpress is still in English.
Can you help me?
Blessings,
Roeland van Spijk
February 1, 2013 at 2:29 am #17016Remkus de VriesMemberIn which folder did you place which files? Screenshot of the folder structure and files would help.
Translate the Genesis Framework with the Genesis Translations plugin.
February 1, 2013 at 3:30 am #17018RoelandMemberSorry Remkus,
But how do i upload this screenshot.
-
AuthorPosts
- You must be logged in to reply to this topic.