leave a comment how can i translate the sentence

arawolf
297 Posts
arawolf posted this 3 weeks ago

How can i change the sentence "leave a comment" into an other sentence in a wordpress site. Thnxs.

How can i change the sentence "leave a comment" into an other sentence in a wordpress site. Thnxs.
Vote to pay developers attention to this features or issue.
2 Comments
Order By: Standard | Newest
Support Team posted this 3 weeks ago

Hello Kris,

Try adding translation in Themler -> Home -> Settings -> CMS CODE:

add_filter( 'gettext', 'wps_translate_words_array' );
add_filter( 'ngettext', 'wps_translate_words_array' );
function wps_translate_words_array( $translated ) {
$words = array(
// 'word to translate' = > 'translation'
'Leave a comment' => 'Your translation',
);
$translated = str_ireplace( array_keys($words), $words, $translated );
return $translated;
}

Update translation there as needed.

Gina
Themler support

Hello Kris, Try adding translation in Themler -> Home -> Settings -> CMS CODE: add_filter( 'gettext', 'wps_translate_words_array' ); add_filter( 'ngettext', 'wps_translate_words_array' ); function wps_translate_words_array( $translated ) { $words = array( // 'word to translate' = > 'translation' 'Leave a comment' => 'Your translation', ); $translated = str_ireplace( array_keys($words), $words, $translated ); return $translated; } Update translation there as needed. Gina Themler support
arawolf
297 Posts
arawolf posted this 3 weeks ago

perfect support ;) thnxs

perfect support ;) thnxs
You must log in or register to leave comments