WPML translation (custom messages)
-
How can I translate messages? Can see some of the strings in WPML string management tool, but after adding translation it doesn’t seems to be working. Also tried to “replace” the string with getText and to translate it as theme part using this function:
function my_text_strings( $translated_text, $text, $domain ) { switch ( $translated_text ) { case '<strong>ERROR</strong>: please type a comment.' : $translated_text = __( 'CUSTOM TEXT', 'THEME NAME' ); break; } return $translated_text; } add_filter( 'gettext', 'my_text_strings', 20, 3 );
It replaced default text, but after translating it over WMPL it is still in one language.
Also i have tried to change default strings in wp-ajaxify-comments.php (in line 37 and line 246), but it didn’t changed from default text.
Any help?
Thanks!
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘WPML translation (custom messages)’ is closed to new replies.