translation - Can't translate child theme

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

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' );

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745316321a4622234.html

相关推荐

  • translation - Can't translate child theme

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

    23小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信