xili-language: a new shortcode revealed !

The latest version of xili-language provides a new shortcode named xili18n.

The short code is usable at the content of a page or post.

The purpose of the short code xili18n is to bring translatable terms inside of a text body. The translation for each language ist stored in the languages .mo file.

What is the goal?

Content can be very rich and complex nowadays (for example a table or form) same counts for specific terms. The idea is creating a clone-able version of a table or form for each language by inserting the shortcode for example at the table header of each column. So you simply need to copy the content into the different languages without translating these again and again.

Here is how the short code is used:

<strong>[xili18n msgid="Edit"]</strong>

The result in English is of course  Edit !

But go to the French or German post to see the result in a foreign language.  😉

Question 1: is is possible to define a context ? Yes with param ctxt !

Question 2: is is possible to choose the text domain ? Yes with param textdomain !

Question 3: Limitations in msgid or msgstr ? Yes only html tags like <strong>, <em> and <br> are possible. See the source code of the xili-language plugin for more details.