Translation comments

Posted in: Newspaper
Post count: 224

Hi!
In my language we have different endings depending on numbers. I need to use 3 different endings for 1 comment, 2-3-4 comments and 5 and more comments. So i need to add one more ending.

How can i do it?

Post count: 7909

Hi,

You can change this in comments.php file: http://screencast.com/t/WLBcwuVa0v

Thanks!

Post count: 224

Thanks for the answer, but i need some more information.
I added code to comments.php so now it’s:
<?php
$num_comments = get_comments_number(); // get_comments_number returns only a numeric value
if ( $num_comments == 0 ) {
$td_comments_no_text = __td(‘NO COMMENTS’);
} elseif ( $num_comments > 1 && $num_comments < 5 ) {
$td_comments_no_text = $num_comments . ‘ ‘ . __td(‘KOMMENTARIYA’);
} elseif($num_comments > 5) {
$td_comments_no_text = $num_comments . ‘ ‘ . __td(‘KOMMENTARIEV’);
}
else {
$td_comments_no_text = __td(‘1 COMMENT’);
}
?>

But how can i translate it to my language now? I don’t see these new blocks in theme panel

Post count: 7909

Hi,

If you have added that code there I see that you have already translated some words there – http://screencast.com/t/Ti1c0oHJpHhttp://screencast.com/t/BVyUHg2aSxu4
I’m not sure what you want to translate, in Theme Panel are also these words in translations – http://screencast.com/t/iKhDk5gq

Thanks!

Post count: 224

Yeah, i translated it, but it’s not my language, i just made a transliterization of Cyrillic to Latin. I’m not sure if i can use Cyrillic symbols in comments.php file..

I added 2 new words (‘KOMMENTARIYA’) (‘KOMMENTARIEV’) and i’d like them to appear in Theme Panel to translate them in Cyrillic symbols

Post count: 7909

Hi,

If you want to appear in Theme Panel you have to add it in td_translate.phphttp://screencast.com/t/2zrqhOajhttp://screencast.com/t/nAi8qZsp66

Thanks!

Post count: 224

Great, thank you!

Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newspaper’ is closed to new topics and replies.