Why xili-dictionary ? [update 0.9.7.2]

xili-dictionary is a plugin (compatible with xili-language) to build a multilingual dictionary saved in the taxonomy tables of WordPress. With this dictionary, collecting terms from categories (title, description), from current theme (international terms with _e() or __() functions), it is possible to create and update .mo file in the current theme folder.

Some themes are multilingual (through fonctions like _e() or __()) and xx_YY.mo files inside the theme’s folder.

With xili-language, it is possible to ‘dynamically’ change theme’s language « on the fly » depending of the language of the current post or the current categories….

With xili-dictionary, it is possible in the WP dashboard, to manage the terms and the translation. All are stored in the terms tables (taxonomy and terms) of WordPress (>2.3). Some very good tools are available (PoEdit or CodeStyling Localization) but none store datas in WP Database.
xili-dictionary is able to :
– import existing .po files
– export .mo files in the target language
– import terms from the categories (name or description).
– …
So it is easy to modify translations on the fly ‘on line’…

Can be used with (or not) xili-language.

Developer’s corner :

Creating and upgrading this type of plugin based on taxonomy tools of WP is a « deep » exercice. WordPress’s Taxonomy is not a easy architecture but very powerful. Now all docs are in taxonomy.php. (folder wp-includes).

As usual, dev.xiligroup try to develop plugin with few lines as possible. (with action, filter and official hooks…).

Some notes :

A term is unique (with his name and his slug) but it can be in one or more « taxonomy ». When xili-dictionary « import » a term of a category, he only create a link between the term and the taxonomy. Delete don’t delete the term attached to ‘category’ taxonomy.

To manage the languages (ie fr_FR, en_US or de_DE…), xili-dictionary use ‘slug’ as root ID. The name of the term is used for internal identification. To store msgid (one) and msgstr (each for target language), the plugin use ‘description’ field that is able to keep html tags….

So the term ‘bad words” has slug “bad-words”. His translation “mots incorrects” has the slug “bad-words_fr_fr”.

Or the term ‘the <strong>good</strong> words” will have the slug “the-good-words”. His translation “les mots <strong>exacts</strong>” will have the slug “the-good-words_fr_fr”.  Column “slug” is present in the list of dictionary in UI to show terms needing translation.

A better UI, Soon more texts and instructions… (don’t forget to read the readme !)

Today – ready for WP 2.8

It is now in WordPress plugin repository .

M 090428

Ce contenu a été publié dans News, Plugins WP, xili-dictionary, avec comme mot(s)-clé(s) , , , , . Vous pouvez le mettre en favoris avec ce permalien.

1 réponse à Why xili-dictionary ? [update 0.9.7.2]

  1. Ian dit :

    This is really neat! Great idea for a dictionary like this.

Laisser un commentaire