translation not working with .mo file (3 posts)

  1. mgason
    Posted 4 years ago #

    I have created a .po file using WPML which finds al of the strings successfully. It is translated.
    When I open my po file in poedit it says for example "From the Blog" = "Du Blog ..."
    I then made the mo file by saving it with poedit.

    my wp-config file says define ('WPLANG', 'fr_FR');

    My file is named fr_FR.mo and is in the folder lang which is a sub folder of the theme folder.
    Functions.php says load_theme_textdomain( 'storefront', TEMPLATEPATH.'/lang' );
    I echo that out on index.php

    <?php $lang_path = TEMPLATEPATH.'/lang';
    echo $lang_path;

    and it returns
    it is a local install and this seems correct

    My po file settings show
    base path ../
    keywords e_ and __

    Nothing is translated. What am I missing. Happy to give a login to a test version online if it will help.

  2. mgason
    Posted 4 years ago #

    oops I also meant to say I code like this that is not translated
    <?php _e( 'From the Blog...', 'storefront' ); ?>

  3. mgason
    Posted 4 years ago #

    I sorted this out and i think it was a bad po file, I noticed it was throwing errors in the log when save in PoEdit
    Basically everything above should work if you have a good po file

Topic Closed

This topic has been closed to new replies.

About this Topic