Xili-language: managing mo files

This page will describe the new fourth tab of xili-language settings screens (Version 2.8.8).

Frontend and Backend (Dashboard)

Since 3.5, WP Core uses separate mo files to display localization on frontend or backend.

xili-language plugin works currently on frontend (theme and post) display in target language. Since 2.8, xili-language is able to assign to an author (or webmaster) his language if the good files are present in wp-content/languages.

To avoid annoying tasks (download from WP sites, extracting the good mo file (from WP kit), renaming, upload to your server), xili-language does it for you according your choice.

Case of themes

The same tasks can be done for the "official" theme like twentyten, twentyeleven, twentytwelve and twentythirteen if one of these is active on your website.

The mo files

.mo file is a binary ‘machine object’ file easy to used by php. It is the compilation of translation strings list of .po files (portable object).

For the core, in wp-content/languages sub-folder, there is 4 files : xx_YY.mo admin-xx_YY.mo admin-network-xx_YY.mo continents-cities-xx_YY.mo

xx_YY can be en_CA for english in canada country.

The servers

The checked servers are Automattic http://svn.automattic.com/wordpress-i18n/ and GlotPress http://translate.wordpress.org/projects/wp.

Settings Screen

Xl-files.png

1. The new tab,

2. Infos about the current version

(here the future WP 3.6 in beta)

3. Infos about available files for one language,

Here the plugin detects the dev version inside GlotPress server. On Automattic server, currently there is no dev version, the checking indicates that the latest version is 3.5.1. So after selecting GlotPress, the download can be fired. (To avoid timeout, it is recommended to check only one language at a time).

4. Infos about the language file in the current parent theme

(here Twenty twelve)

These infos are displayed ONLY if the current theme is a child theme.

When unchecked (by default): xili-language uses only mo files available in the child theme.

When checked, xili-language merges mo files from both parent and child. It is useful for developer adding few new localizable terms (msgid) in the child theme. Don't need to copy the parent file inside the child language sub-folder and to expand it with the new msgid. Easier to exchange files with the translators.

F.A.Q.

Where to see if dashboard language is available ?

- On top right admin bar menu, at left of current login name.

- On user profile popup language.

- In the wp-content/languages subfolder via FTP client.

Why MO merging checkbox does not appear ?

The current theme is not a child theme of another !

Why some languages are not present ?

Wordpress and GlotPress servers are based on contributive tasks. It is why some languages cannot be downloaded from these servers.


Example Farsi or Persian :

The files must be extracted from the WP package here. After extraction, mo files must be uploaded in the wp-content/languages subfolder.