xili-language plugin: Creation of a multilingual website with WordPress 3.0 and his new theme twentyten

The new 3.0 version of WordPress is such that it is today easier to create a multilingual site with plugin Xili-language and few methods without being a webmaster with knowledge in php…
Xili-language is also a very powerful toolkit for webmasters and designers of multilingual sites (content management – CMS). These aspects are not addressed here.

What is a multilingual site?

This is a site that contains articles and pages in different languages, each having (or not) a translation / adaptation into another language. For the visitor, who often comes to the site after a search, he discovers not only the desired article, but the whole theme of WordPress (the menus, the sidebar, the titles of categories) that will be displayed in the same language than the target page or section.

Do not be confused with the localization that is a translation of the frozen look of the site (theme) and that is only in the language of its author.
Finally, the authors of the multilingual site is the master of content. There is no automatic translation by robots.

The Xili-language plugin adds a taxonomy “language” that does not conflict with other “semantic” classifications of the site. So an article is an article, a page, a page with its title, its content, excerpt (abstract) and classification (categories, keywords, …) etc … No change untimely interface author or unnecessary additions to the database tables WP. Each author does not interfere with the author in another language. Since the WP version 2.3, Xili-language is functional and takes part gradually of improvment of WP kernel (core).

How does it work?

The plugin Xili-language uses the potential of WordPress (taxonomies, hooks, api, etc …) to interpret the classification by language and adapt the translation files (.mo) available in the folder of current theme.

Basically a localizable theme will change the language according the language in wp-config.php which is the language of the Author’s interface (dashboard) of the site.

In a multilingual context, it is necessary to have multiple languages available for the visitor side, the admin side can remain in the language of the webmaster. In most cases the default language is English (that of WordPress) and therefore the translation files (.po and mo) refer to this language (lines msgid). The line msgstr being that the translated text.

msgid "Comment %d does not exist"
msgstr "Le commentaire %d n’existe pas."

As the default theme “twentyten” is in English, the root language for multilingual site in our example will be English.

extract of file search:
_e( 'Search Results for: %s', 'twentyten' );

Remember, for to define the key texts of the site description and categories: we will do the same.

List of categories

List of categories

What to prepare?

For the theme “twentyten”, simply add the .mo language files selected in the WordPress installation kits and add them to the sub-folder ‘languages’ of the theme folder in installed site. For this example, we’ll take four languages : French, German, English and Spanish.

How to translate the site-specific terms (categories, labels, …)

Either you have poEdit app. and a text editor to complete files .po or, you used the plugin Xili-dictionary (beta because of its spartan interface – no javascript for lists and pagination but stable – that we use daily).

Step by step

Example for a single site (multi-mode (eg wpmu) will be dealt with later because multisite requires a somewhat different approach in the management and location of file as .mo)

WordPress 3.0 installation

Check that theme “twentyten” is current.

Add the file .po and .mo of target languages (here fr_FR, de_DE and es_ES)

Can be found in sub-folder languages of theme’s folder named twentyten of each kit as below.
http://es.wordpress.org/
http://fr.wordpress.org/
http://de.wordpress.org/

Enabling plugins Xili-language (choice of languages) and Xili-dictionary

Creating a category – such as “Actualités” then “News” and its description (“Recent news about website) as the pivot language is English.

Writing of one or two articles in French and / or English we will learn to link if their content is the translation – adaptation of the other.

Adding widgets Xili-specific language – settings…

Customizing the new menu system of the header (wp_nav_menu)

Navigation menu

Navigation menu

tags and plugin Xili-tidy-tags.

Details of previous steps

[UPDATED] The next post will be different as expected because it will be the same continuation of the other series about child theme. To avoid modifications inside default theme, a child theme is built (and available soon) and contains mimimum to have a multilingual website powered by xili-language.

To follow

This entry was posted in How to and tagged , , , , . Bookmark the permalink.

One Response to xili-language plugin: Creation of a multilingual website with WordPress 3.0 and his new theme twentyten

  1. Pingback: Episode #2 – Creation of a multilingual website with xili-language | xili-plugins for multilingual sites

Comments are closed.