admin管理员组

文章数量:1419648

Using last version of Wordpress, I am stuck here. I can't translate my theme, some of the strings remain in english (I want french).

I use Poedit and generated the .mo file.

I pasted it in :

/themes/homeland-child/languages/fr_FR.mo

I checked in it, I find my translated strings.

homeland-child is my theme, it's a child from homeland theme.

But, strings are still in English on the website.

For example Leave a comment remains in English on the site.

My site is in french, dunno if there is a kind of cache ?

Using last version of Wordpress, I am stuck here. I can't translate my theme, some of the strings remain in english (I want french).

I use Poedit and generated the .mo file.

I pasted it in :

/themes/homeland-child/languages/fr_FR.mo

I checked in it, I find my translated strings.

homeland-child is my theme, it's a child from homeland theme.

But, strings are still in English on the website.

For example Leave a comment remains in English on the site.

My site is in french, dunno if there is a kind of cache ?

Share Improve this question asked Jul 17, 2019 at 8:39 Vincent DecauxVincent Decaux 2252 silver badges12 bronze badges 0
Add a comment  | 

1 Answer 1

Reset to default 0

Ok, found on a blog this solution, paste in functions.php of your child theme :

function child_theme_slug_setup() {
    load_child_theme_textdomain( 'parent-theme-domain', get_stylesheet_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'child_theme_slug_setup' );

本文标签: translationCan39t translate child theme