xili-language lets you create and manage multilingual WP site in several languages with yours or most famous localizable themes. Ready for CMS design.
READ CAREFULLY ALL THE README AND PREREQUISITES
xili-language.php and language files to the /wp-content/plugins/ directory,_e('the term','mytheme') and no text hardcoded - and contains .mo and .po files for each target language - (application poEdit and/or plugin xili-dictionary can be used)language_attributes() template_tag).Nothing to do in functions.php as in former version of WP and xili-language : only verify that the theme is localizable (translation-ready) and functions.php contains a function load_theme_textdomain(); and that the theme's folder contains .mo files (in root or a language sub-folder) for each languages of your website. As example "twentyten" default WP theme is compatible with help of a child theme "twentyten-xili" available here in action and downloadable .
Plugin is backward compatible for theme of monosite. But if you upgrade xili-language, it is better to restore your theme with default load_theme_textdomain();. Delete lines concerned by obsolete constants THEME_TEXTDOMAIN and languages sub-folder THEME_LANGS_FOLDER.
If your theme is compatible both for newest (>3.0-apha) and older versions, add some conditional lines.
Today with WP3.0, comments form language is based on default language of admin UI and not on theme's language. xili-language solves this features. So you need to add this terms msgid in the .po of your theme for translation used by xili-language. In latest version, xili-dictionary adds this option to avoid tedious copy and paste !
To change the language of the frontpage according to the language of the visitor's browser, check the popup in right small box in settings. To change the default language of a new post according to the language of the author's browser, check the popup in right small box in settings.
Three widgets are created to enrich sidebar : list of languages, recent posts and recent comments with sub-selection according current language.
Shortcode to add a link to other language inside content of a post like
[linkpost lang="fr_FR"]
is available in a library in complement to xili-language.
The most current template tags don't need special work: wp_list_categories(), wp_title(),...
wp_get_archives
Possible that very special permalinks need to use hook named xiliml_get_archives_link. -
Sub selection of archives for wp_get_archives() with &lang= (see § below)
wp_list_pages()
with optional query tag &lang=
xili_language_list()
xiliml_the_category()
improved xiliml_the_others_posts() function and theme tag to be used in multilingual category loop and by option (array) to return an array of linked posts in other languages (useful for CMS webmasters) (array of lang and id ) - the id is easily transformable in permalink with function get_permalink() when using this array.
xiliml_recent_comments() is also available if you want to create a template tag with resulting objects array).Archives tags is a very complex template tag in his background and not very easy source hookable. So we decided to add few features : by adding query in vars of the function, it will be possible to display a monthly list of archives for a selected language - wp_get_archives('..your.vars..&lang=fr_fr') - or the current the theme language - wp_get_archives('..your.vars..&lang=') -. The displayed list of links will be translated and link restrited to display only archives of this language.
Examples for theme's designer of functions to keep text direction of theme and of current post : (see child theme of twentyten example in) or twentyeleven child theme using rtl.css.
<?php
$themelangdir = ((class_exists('xili_language')) ? the_cur_lang_dir() : array ()) ; ?>
<div class="inside <?php echo $themelangdir['direction'] ?>">
...
example in loop :
<?php while (have_posts()) : the_post();
$langdir = ((class_exists('xili_language')) ? get_cur_post_lang_dir($post->ID) : array());
?>
<div class="story <?php echo $langdir['direction'] ?>" >
minimal example in css :
.rtl {direction: rtl; text-align:right !important; font-size:130% !important;}
.ltr {direction: ltr; text-align:left !important;}
Caution : multilingual theme with both ltr and rtl texts needs a rigourous structure of the css ! See note in version 2.4.
Requires: 3.2.1 or higher
Compatible up to: 3.3.1
Last Updated: 2012-2-3
Downloads: 45,217




