Hi
I’m trying to translate the theme, but I’m having problems, thanks for your help.
1: .mo and .po files are not recognized. I folowed the instructions (https://theme.co/docs/theme-translations), my files are here /wp-content/themes/pro-child/languages
. I put the string via Code Snippet:
function load_child_language() {
load_child_theme_textdomain( ‘x’, get_stylesheet_directory() . ‘/languages’ );
}
add_action( ‘after_setup_theme’, ‘load_child_language’ );
But nothing changes.
- I tried to translate with functions. I worked sometime, but not for all strings. For ex:
// Traduire Commentaires
add_filter( ‘gettext’, ‘x_translate_comments’, 9999, 3 );
function x_translate_comments( $translated, $text, $domain ) {
if($text==‘Comments’) return ‘Commentaires’;
else return $translated;
}
Thanks for your help!