• mgason

    (@mgason)


    Hi
    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
    /Users/gasonmark/Sites/echo/wp-content/themes/storefront-echo-1.4.1/lang
    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mgason

    (@mgason)

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

    Thread Starter mgason

    (@mgason)

    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘translation not working with .mo file’ is closed to new replies.