Hi Rickpix,
Please add the following function in our child theme’s functions.php file
function bold_photography_register_polylang_strings() {
if ( ! function_exists( 'pll_register_string' ) ) {
return;
}
$mods = get_theme_mods();
foreach ( $mods as $key => $value ) {
// Only register clean strings
if ( is_string( $value ) && strlen( trim( $value ) ) > 0 ) {
pll_register_string(
$key,
$value,
'Bold Photography'
);
}
}
}
add_action( 'after_setup_theme', 'bold_photography_register_polylang_strings', 20 );
After you add this code. You need to go to “Appearance => Customize” and change the content which you want to translate.
For example, if you want to change Header Media Title and Site Header Text, then go to “Appearance => Customize => Header Media” and change Header Media Title and Site Header Text and click on publish. After you make the changes, it will show those strings Polylang at “Languages => Transalations”
Regards,
Sakin