loading call for the textdomain

Community Forums Forums Internationalization and Translations loading call for the textdomain

This topic is: not resolved

This topic contains 7 replies, has 3 voices, and was last updated by  Roeland 1 year, 8 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #16151

    Roeland
    Participant
    Post count: 4

    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.po

    I 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?

    #16196

    SoZo
    Moderator
    Post count: 1573

    The init line he is referring to is at the top of functions.php

    [php]<?php
    /** Start the engine */
    require_once( get_template_directory() . ‘/lib/init.php’ );[/php]


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #16352

    Roeland
    Participant
    Post count: 4

    Tank 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.po

    Can 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 <roelandvanspijk@hotmail.com>\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:”

    #16354

    Remkus de Vries
    Moderator
    Post count: 25

    The AgentPress theme is already translated to Dutch.


    More about me: ForSite Media | Remkus de Vries.

    Genesis Plugins: Genesis Translations | Genesis Toolbar+ | Genesis Prose Exporter
    Make the CSS editing part of your life easier for yourself – use Google Chrome and its Developers Tools.

    #16357

    Roeland
    Participant
    Post count: 4

    Hoi 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:)

    #16518

    Roeland
    Participant
    Post count: 4

    Hi 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

    #17016

    Remkus de Vries
    Moderator
    Post count: 25

    In which folder did you place which files? Screenshot of the folder structure and files would help.


    More about me: ForSite Media | Remkus de Vries.

    Genesis Plugins: Genesis Translations | Genesis Toolbar+ | Genesis Prose Exporter
    Make the CSS editing part of your life easier for yourself – use Google Chrome and its Developers Tools.

    #17018

    Roeland
    Participant
    Post count: 4

    Sorry Remkus,

     

    But how do i upload this screenshot.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.