WordPress.org

Ready to get started?Download WordPress

Plugin Directory

xili-language

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

See also wiki.

  1. Upload the folder containing xili-language.php and language files to the /wp-content/plugins/ directory,
  2. Verify that your theme is international compatible - translatable terms like _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)
  3. Verify that a domain name is defined in your theme - see note at end list below,
  4. Activate the plugin through the 'Plugins' menu in WordPress,
  5. Go to the dashboard settings tab - languages - and adapt default values if necessary by adding your languages in the catalog. You can set the order (1,2,3...) of the series. (used in language_attributes() template_tag).
  6. Modify each post by setting (checking) the language in xili-language box (under the content box) before publishing.
  7. Other settings and parts (Browser detection, widgets, shortcode, template tags) see below… and examples.

Tabs of settings

Settings are progressively reorganized in 6 tabs:

  1. Languages list: Where you define the list of languages needed in your multilingual website.
  2. Languages front-end settings: Where you define some rules and behaviour when visitor arrives in the website or navigates inside.
  3. Settings for experts: Where experts are able to set and recovers previous sets. (backwards compatibility)
  4. Managing language files: To import .mo files for theme or dashboard (if available in GlotPress or Automattic servers).
  5. Managing Authoring rules: To define rules and settings in the dashboard side and help authoring.
  6. xili-language support: A form to send an email to xiligroup support.

(online help on the top right tab for each settings page)

Additional infos

  1. Before using your own theme, to understand how xili-language works, install the example child theme of one of the bundled themes like TwentyFourteen shown in this commented demo site.
  2. Child of bundled themes include a navigation menu - see links in FAQ -. In xili-language settings, it is possible to insert automatically languages list in the menu previously set by you.
  3. If you are webmaster and want to add lot of personalizations in your theme, read source and visit latest news.

Browser detection for visitors or authors

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.

xili-language and widgets

Three widgets are created to enrich sidebar : list of languages, recent posts and recent comments with sub-selection according current language.

xili-language and shortcode

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.

xili-language and template tags

  • xili-language "translates" template tags and permits some variations for webmasters:

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 "provides" new template tags (or widgets) to solve issues from WP core or add new features for CMS:
xili_language_list()
  • outside loop (sidebar) display the languages of the site (used also by widget)
xiliml_the_category()
  • replace the_category() template tag of WP Core

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.

xili-language and specific functions

Requires knowledges in php and WP ! After class in sources files, some functions are available - see sources for details.

  • the_curlang() returns by default the slug of the current language of the displayed webpage (alias xili_curlang() since 2.11+). If param is specified, return ISO, Full Name or alias of current webpage - see sources -
  • is_xili_curlang( $lang ) tests (returns true or false) after testing language of current webpage. Param can be a language slug (as string) or a list of slugs (as an array). Example: is_xili_curlang( 'fr_fr' ) returns true if webpage is in french - since 2.11+

  • widget for recent comments that can subselect those for current language. (a function xiliml_recent_comments() is also available if you want to create a template tag with resulting objects array).

Archives selection

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.

Requires: 3.8.3 or higher
Compatible up to: 4.0-beta4
Last Updated: 2014-9-1
Downloads: 145,525

Ratings

4 stars
4.2 out of 5 stars

Support

3 of 9 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1
100,2,2 100,1,1
100,1,1 100,1,1
100,1,1 100,1,1
100,2,2 100,1,1 100,1,1 100,1,1
100,1,1 100,2,2 100,1,1 100,1,1 100,3,3 100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
100,1,1 100,1,1
100,1,1 100,1,1 100,1,1 100,1,1 80,5,4
100,1,1 100,2,2 100,1,1
100,1,1 100,1,1
100,1,1 50,2,1
100,1,1 100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,2,2 100,1,1 100,1,1
100,2,2 100,1,1 100,1,1
0,1,0 100,4,4 100,2,2 100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,2,2
100,1,1 100,1,1
100,1,1 100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
100,2,2
100,1,1 100,1,1 100,1,1 100,2,2 100,1,1 100,1,1 100,2,2 100,1,1 50,2,1 100,1,1 100,1,1 100,1,1 100,1,1 100,2,2
100,1,1
100,1,1
100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,2,2 100,2,2
100,1,1
100,1,1 100,1,1 100,1,1 100,1,1
100,1,1
100,1,1 100,1,1
100,1,1 100,1,1 100,1,1 100,2,2 100,1,1
100,1,1