2013-07-04, 01:44:25
@TeeJay or others interested
As you know, News Manager is currently single-language but (since 2.4.0) it works with a I18N multilanguage site: you see the same posts on any language, but at least links in news pages are correctly generated (they don't take you to a page with a different language). However, texts like "Published on", "Older posts", etc. are always rendered in the language selected for the news page.
Here's a tip to translate those messages.
Let's suppose you have a default language, and English as secondary one.
Insert this code in your theme's functions.php file (create it if your theme hasn´t one, with <?php as first line):
- No need to insert all lines, just those you want to redefine.
- Change 'en' by your prefered secondary language. You can use several conditionals (if (... }) if you have more than two languages).
As you know, News Manager is currently single-language but (since 2.4.0) it works with a I18N multilanguage site: you see the same posts on any language, but at least links in news pages are correctly generated (they don't take you to a page with a different language). However, texts like "Published on", "Older posts", etc. are always rendered in the language selected for the news page.
Here's a tip to translate those messages.
Let's suppose you have a default language, and English as secondary one.
Insert this code in your theme's functions.php file (create it if your theme hasn´t one, with <?php as first line):
Code:
if (isset($_GET['lang']) && $_GET['lang'] == 'en') {
$nm_i18n["FOUND"] = "The following posts have been found:";
$nm_i18n["NOT_FOUND"] = "Sorry, your search returned no hits.";
$nm_i18n["NOT_EXIST"] = "The requested post does not exist.";
$nm_i18n["NO_POSTS"] = "No posts have been found.";
$nm_i18n["PUBLISHED"] = "Published on";
$nm_i18n["TAGS"] = "Tags";
$nm_i18n["OLDER_POSTS"] = "← Older Posts";
$nm_i18n["NEWER_POSTS"] = "Newer Posts →";
$nm_i18n["SEARCH"] = "Search";
$nm_i18n["GO_BACK"] = "<< Go back to the previous page";
$nm_i18n["ELLIPSIS"] = " [...]";
$nm_i18n["LOCALE"] = "en_US.utf8,en.utf8,en_US.UTF-8,en.UTF-8,en_US,en";
$nm_i18n["DATE_FORMAT"] = "%b %e, %Y";
}
- No need to insert all lines, just those you want to redefine.
- Change 'en' by your prefered secondary language. You can use several conditionals (if (... }) if you have more than two languages).