Change language on on blog page?

dragana
70 Posts
dragana posted this 4 weeks ago

How do I change the [comment] on blog page?

How do I change the [comment] on blog page?

Last edited 4 weeks ago by dragana

Vote to pay developers attention to this features or issue.
7 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 4 weeks ago

Hello Dragana,

If this word is not listed in translation file or setting in the language plugin you use, you can try adding this code via 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'
'comment' => 'yourtranslation',
'Comment' => 'Yourtranslation',
);
$translated = str_ireplace( array_keys($words), $words, $translated );
return $translated;
}

Where you need to replace yourtranslation with the correct word.

Gina
Themler Support

Hello Dragana, If this word is not listed in translation file or setting in the language plugin you use, you can try adding this code via 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' 'comment' => 'yourtranslation', 'Comment' => 'Yourtranslation', ); $translated = str_ireplace( array_keys($words), $words, $translated ); return $translated; } Where you need to replace yourtranslation with the correct word. Gina Themler Support
dragana
70 Posts
dragana posted this 4 weeks ago

It totally messed up my site. All I now see is: Parse error: syntax error, unexpected end of file in /home/desincse/kristensresa.se/wp-content/themes/Untitled/functions-additional.php on line 14

I can't even log in anymore...

Edit: Got it to work. Did it directly via ftp.

However, it doesn't work. I also need "Leave a" to be translated.

It totally messed up my site. All I now see is: Parse error: syntax error, unexpected end of file in /home/desincse/kristensresa.se/wp-content/themes/Untitled/functions-additional.php on line 14 I can't even log in anymore... Edit: Got it to work. Did it directly via ftp. However, it doesn't work. I also need "Leave a" to be translated.

Last edited 4 weeks ago by dragana

Support Team
Support Team posted this 4 weeks ago

What is your WP version?
Could you please try to add the code to functions.php directly?

Gina
Themler Support

What is your WP version? Could you please try to add the code to functions.php directly? Gina Themler Support
dragana
70 Posts
dragana posted this 4 weeks ago

Just anywhere in functions.php?

Just anywhere in functions.php?
Support Team
Support Team posted this 4 weeks ago

You can add it to the end of the file.

Gina
Themler Support

You can add it to the end of the file. Gina Themler Support
dragana
70 Posts
dragana posted this 3 weeks ago

Ok, I didn't do that yet. But now when I opened themler in wordpress I got this message: 'syntax error, unexpected end of file - WordPress'.
And that's all I see. I'm supposed to see first page.

Ok, I didn't do that yet. But now when I opened themler in wordpress I got this message: 'syntax error, unexpected end of file - WordPress'. And that's all I see. I'm supposed to see first page.

Last edited 3 weeks ago by dragana

Support Team
Support Team posted this 3 weeks ago

Remove the code added previously to functions-additional.php file via FTP.
I am waiting on the reply from the developers about the translation.

If you switch to standard WP theme, do all of the words get translated?

Gina
Themler Support

Remove the code added previously to functions-additional.php file via FTP. I am waiting on the reply from the developers about the translation. If you switch to standard WP theme, do all of the words get translated? Gina Themler Support
You must log in or register to leave comments