Translations for Sydney child theme


I’m using Sydney child theme and would like to translate it.

So, I have created a “languages” folder, in which i have copied parent “sydney.pot” into “sydney-child.pot”.
I have created my translations files using Poedit and put my .po and .mo files in that “languages” folder.

I have added “Text Domain: sydney-child” in the child styles.css file

And also added this into child functions.php :

function sydney_child_setup() {
    load_child_theme_textdomain( 'sydney-child', get_stylesheet_directory() . '/languages' );
add_action( 'after_setup_theme', 'sydney_child_setup' );

But child theme loads parent theme language files.

Is there anything I did wrong ?

Thanks for your help

Hello there,

Try to translating your child theme using Loco Translate plugin instead of Poedit.

Let me know how it goes.


Hello Kharis,

I have installed and used Loco Translate as suggested.

The plugin do find my sydney-child.pot. I can add translations through it.

But still, my child theme doesn’t load child translation file but the parent one.

On Loco dashboard, I can see “Sydney Child Extends : Sydney”. This is correct, right ?

Wow : it seems overriding parent theme language file is not trivial. I found a trick here :

Which is :

  1. create a subfolder sydney-child/languages/sydney
  2. Put .mo and .po files here
  3. and add load_theme_textdomain( 'sydney', get_stylesheet_directory() . '/languages/sydney' ); just before the load_child_theme_textdomain

Isn’t there an easiest way ?