• Resolved Arnoud

    (@derice)


    I have WP 2.5.1 running on a webhosting server (Apache), PHP 5.2.4, gettext is enabled.

    When I upload a nl_NL.po file into /wp-content/languages the blog isn’t translated (or the /wp-includes/languages).
    Except for the posts that are created with the [lang_nl] & [lang_en] tags by my plugin.

    The wpconfig file has the locale set to NL
    (‘WPLANG’, ‘nl_NL’);

    For example:
    In the sidebar.php of my theme I have the following code:
    <h2><?php _e(‘Language’); ?></h2>
    In the .po file I have created a translation:
    msgid “Language”
    msgstr “Taal”

    But what ever locale I use in the browser (or my blog) it’s not translated into Dutch, it remains in English…

    any ideas what I am missing?

Viewing 6 replies - 1 through 6 (of 6 total)
  • .po file does nothing for translation. That’s the editable version of the translated strings.
    You need the .mo file to make it work.

    Installing_WordPress_in_Your_Language

    Thread Starter Arnoud

    (@derice)

    I mixed up, sorry.
    I meant the .MO files.

    Can’t seem to edit my post’s title though…

    OK.
    Now the next lesson: the WP .mo file translates ONLY and exclusively the WP admin interface. Not the themes. And it never translates your blog posts!

    Themes and plugins need their own po/mo files and they also need to be prepared for translation.
    See more: https://boren.nu/archives/2004/11/01/localizing-plugins-and-themes/

    Thread Starter Arnoud

    (@derice)

    Thanks for the clarification.
    I understand that I have to create and place a NL_nl.mo file in the theme directory.

    It also states that i have to call a function called: load_theme_textdomain()

    where sould I call this function? In what file?

    Thread Starter Arnoud

    (@derice)

    Oh and by the way, I have downloaded the official NL_nl.mo file for the admin interface, and it isn’t translated…

    Thread Starter Arnoud

    (@derice)

    Issue resolved!

    I received a tip to turn off my translation plugin: https://fredfred.net/skriker/index.php/polyglot/

    Once turned off, the backend was translated instantly into NL.
    The frontend ofcourse (the posts) didn’t.

    I then installed Qtranslate, that worked perfectly!

    Conclusion: Polyglot 2.5 isn’t fully compatible with WordPress 2.5

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘.po files not used by WordPress’ is closed to new replies.