How to switch theme language when using Child Theme


I am trying to translate teme to Croatian, hr_HR language.
Page is

I have put define(‘WPLANG’, ‘hr_HR’); in Functions.php
I have put hr_HR.po and files in /language folder of theme.

I am using child theme.
I have also put hr_HR.po and files in /language folder of child theme,
and have put load_theme_textdomain( ‘sparkling’, get_stylesheet_directory() . ‘/languages’ ); in functions.php of the child theme.

No page is translated to Croatian.
Please help!

OK, I have found the answer myself, so I will share it.

The folder for translations is not /languages in theme folder, but /wp-content/languages/themes and you have to change .po and .mo file names to sparkling-hr.po and

“hr” is code for Croatian language.

Hi @dampas,

Awesome great to see you got the answer found yourself and thanks for sharing it here in the forum.

I hope the answer you have shared will help other forum users who are trying to achieve the same.

Your help here is really appreciated.

Have a fantastic day!