• Hi,

    I am having problems with a premium wordpress theme that is translation ready but isn’t being translated by wordpress while everything seem to be set-up properly:

    In wp.config.php there is:
    define ('WPLANG', 'fr_FR');

    In functions.php there is:

    // Localization Support
    $lang = TEMPLATE_PATH . '/lang';
    load_theme_textdomain('theme_textdomain', $lang);

    And here is a sample of what the translation ready text looks like:
    <?php _e('New Listings', 'theme_textdomain'); ?>

    I have also made sure that I have fr_FR.mo and fr_FR.po in the proper folder: lang

    Can someone please help?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter medaa25

    (@medaa25)

    Update:
    I have also be assured by my host that my server has gettext enabled. I am with hostgator on a share server so that shouldn’t be a problem.

    Moderator keesiemeijer

    (@keesiemeijer)

    Try it with this in your header.php:

    load_theme_textdomain('theme_textdomain', get_template_directory() . '/lang');

    I had some problems with this as well and used this plugin to recreate the .mo files: codestyling localization
    After I recreated the .mo file with this plugin everything worked.

    Thread Starter medaa25

    (@medaa25)

    Hi keesiemeijer, Thanks a million for your tip, it works like a charm on most of the wesbite. However there is a problem with include files I think:
    There is an advanced search feature located in the “includes” folder and it isn’t being translated. Do you know any other tricks by any chance? I have located that file, it is translation-ready as well.

    Thanks a lot in advance, you already saved me a lot of hair.

    Moderator keesiemeijer

    (@keesiemeijer)

    Maybe they are not translated yet. In the localisation plugin go to tools > localisation > themes and klick “Rescan” next to the language file and click “Scan now”. Next click “edit” and see if the not translated strings are in the .mo file.

    Thread Starter medaa25

    (@medaa25)

    keesiemeijer YOU ARE THE MAN!

    If you have a paypal account let me know and I will send you beer money… Nothing much but I’d like to thank you and buy you a drink.

    Moderator keesiemeijer

    (@keesiemeijer)

    No account, but you can give my beer money to the developer of that very usefull plugin here (scroll down for the donate button). Glad you got it up and running

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Problems with WP LANG. Translation Not Working’ is closed to new replies.