Support » Themes and Templates » translation not working with .mo file

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • oops I also meant to say I code like this that is not translated
    <?php _e( 'From the Blog...', 'storefront' ); ?>

    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.