• Resolved UlysseFRU

    (@ulyssefru)


    Hi,

    First thanks for providing this theme which exceeds by far the average quality of available free themes there.

    I’m trying to use the french translation of the theme on my website : Website link to

    First I followed the recommendations by:
    – Creating language folder in hueman-child folder
    – Uploading fr_FR.po and generated thru software fr_FR.mo which wasn’t available in GitHub repository
    – Creating functions.php with the load_theme_textdomain( 'hueman-child', get_template_directory().'/languages' );

    The above didn’t work. So I simply put the fr_FR.po/.mo files in the parent hueman language folder. This didn’t work neither. I renamed fr_FR.po/.mo files into us_US hoping that for some reason the theme wanted those ones. Still don’t work. Maybe some sort of cache that I need to clean to see the changes…

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi,

    Simply adding your translation file to the languages repository should do the trick.
    You could perhaps try changing the following line in your wp_config file.

    define ('WPLANG', ''); to define ('WPLANG', 'fr_FR');

    Thread Starter UlysseFRU

    (@ulyssefru)

    @Frenchtastic Thanks, I’m actually looking for translating the third party theme not the WordPress. But agree maybe the topic description is confusing.

    Yes absolutely,
    The standard procedure for translating a WP theme is simply adding your .mo and .po file to the language repository.
    If it does not work it might be because your are not using WordPress in this very language. Let’s say you add your fr_FR translation file to your theme but you are using WordPress in English you need to tell WordPress which language file to use.
    To do so simply edit the following line in your wp_config file
    define ('WPLANG', '');
    to
    define ('WPLANG', 'fr_FR');

    Thread Starter UlysseFRU

    (@ulyssefru)

    Checked this out in my WP config and actually it is already set to define (‘WPLANG’, ‘fr_FR’); since I have installed french wordpress directly.

    Hum..

    Do you have both fr_FR.mo and fr_FR.po files? Is text domain declared?

    Thread Starter UlysseFRU

    (@ulyssefru)

    Yes, both files are in the language folder and text doamin declared as well through the function:
    load_theme_textdomain( 'hueman-child', get_template_directory().'/languages' );

    Are the *.mo and *.po files located in your child theme’s languages/ directory? If so, you should call get_stylesheet_directory() instead. When you are using a child theme, get_template_directory() points to the parent theme.

    Also, the first argument should be 'hueman', because that’s the text domain that you’re adding translations for.

    Thread Starter UlysseFRU

    (@ulyssefru)

    Thanks ! That works ! Was calling the wrong language file location.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Make work French translation/language’ is closed to new replies.