最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

translation - Can't translate child theme

programmeradmin1浏览0评论

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' );
发布评论

评论列表(0)

  1. 暂无评论