Filter 'comments_number'
. You get the translated number and the real number as arguments. Return what fits best.
Sample code:
add_filter( 'comments_number', 'wpse_31328_comments_number_i18n', 10, 2 );
function wpse_31328_comments_number_i18n( $text, $number )
{
if ( 2 === $number )
{
return _x( '2 comments', 'comments number', 'your_text_domain' );
// or hard coded:
// return '2 komentarja';
}
return $text
}
Related Posts:
- Change language of comments template
- How to get Post title by locale with Qtranslate-X
- How to post one comment for all the translated posts
- Getting Post Comments for post ID using WP_Query() and a Custom Loop?
- gettext does not translate when called in ajax
- How to escape the single quote character in i18n translation strings?
- How to use a custom comments template
- Comment visibility
- Get comments for more than one post
- Allowing more elements in comments via functions.php
- Set post comments open function
- “Categories” for comments?
- Allow anonymous comments, but prevent spam [closed]
- Where to remove from comment’s feed?
- Allow guests comments on single post
- Delete all user comments
- Why do I get email notifications about comments that WordPress has already determined are spam?
- Delayed commenting
- “Leave a comment” link even when you can’t
- An action hook where a comment meta is updated
- Display number of comment replies
- User can post only one comment per day on one page
- Last comment page first with full number of comments?
- Only subscriber role user can comment not other
- customize comment form
- How to check if commenter is the_author?
- Relaxing unescaped HTML filtering inside tags?
- WordPress comments email notification for authors
- How to get the result of comments_number() as a string instead of printing it out?
- Should I still worry about paginated comments with the latest wordpress versions?
- How to dont allow registered users to comment without being logged in?
- edit comments capability for authors
- Publish a message on facebook after having posted a comment
- Restore trashed posts with comments
- How to import only certain comments from post[s]
- How to remove ‘Site’ in the comment form?
- Make wordpress comments work with include templatepath
- Removing from Comment
- How do you turn on comments for only the last page of a paginated post?
- How to not load comments form on post preview?
- Sort/list/arrange comments by comment author in un-nested/no thread comments
- Should shorcodes in i18n plugins be translated and if so, how?
- Archive comment w/o moving to spam/trash
- Get the top level comment ID
- Custom WP Comments Query with Nested Comments Possible? (Hierarchy/Depth)
- Log file reports SQL Error processing child comments
- How can I assign a specific id to the last comment of a post
- Modify WordPress Comment From For AMP Html
- Get Post ID within wp_set_comment_status hook
- How to implement comments on specific fields in wordpress?
- Cancel comment filter?
- get_comments not working consistantly with post_id
- Comments are invisible, what’s the problem with wp_list_comments?
- WP confusing “links to my articles” with “comments”?
- How to check if a comment has replies?
- Can I have Comments open to specific users only?
- Safe to remove this: when using a 3rd Party Comment App? [closed]
- How to become a translator on wordpress.org?
- Localization, escape html elements mid-sentence
- How do I disable the discussion notification emails to us when a comment is “approved” and when an adiministrator replies?
- Is hint for translator compulsory while internationalizing a string containing variables?
- Review count per product
- Moving post’s content to post’s comments section
- Localization of WP theme
- How to create post comment from different domain
- Display custom text when comments are closed
- Returning error upon comment being flagged as spam
- I need to disable Disqus comments pre-approval, but i can’t find where
- JetPack comment threads are displaying above comment box? [closed]
- Need Comment Link Help
- Page comes up blank using w3 total cache [closed]
- Comment Table Size Results in Slow Page Loads and 500 Errors
- Insert ads between comments
- get_query_var(‘paged’) for WP_Comment_Query always return 1 when using paginate_comments_links()
- How to show username in reply to comment?
- Custom sort comments with select form
- Limit Comment Line Count – Add Read More Button
- Commenter username copies author username
- Fire Social Annex Code on Comment Approval
- Displaying comment rating stars in carousel
- Enable comments option
- Change Comment Text [duplicate]
- Comments closed but enabled on edit screen
- Let user delete comment on front end only
- WordPress Localization error within return value
- Plugin translation not displaying
- How to force users to nest their comments
- jQuery to Create Button to Show/Hide WordPress Comments and to Hide Comments by Default
- Auto approve all comments (editor)
- add field comment [duplicate]
- Let users comment on categories in WordPress
- Loop not displaying comments_popup_link
- Display of comment_date within get_comments?
- How to batch convert comments to posts?
- Customize comment notification e-mails with HTML
- prevent duplicate comments using wp_insert_comment
- I need help about wordpress of members section
- Query comments with non-empty ‘author_url’ value on Admin Comments Screen
- Customize the new comment notifications sent to the post author after the comment is approved
- Get approved comments or comments that the author is me