I have got some problem of execution of translation in some specific cases. The order of execution of system plugins is very important.
So I don't use anymore Système - Multi Languages CK. I do all translation using only Rereplacer.
For each language used in the site I create a Rereplacer record :
What I did for french :
in the seach field I write :
this interprets all text which is written like that {fr}....you text to write in french...{/fr}
in the replace field I write :
Code:
{source 0}
[[?php
$parm = "\1";
$lg = &JFactory::getLanguage();
switch (substr($lg->get('tag')[[comma]]0[[comma]]2))
{
case "fr" :
echo $parm;
break;
default:
echo "";
}
?]]
{/source}
this is some PHP which get the origin text (....you text to write in french...) in the present case
Then it checks what is the current language used in the text.
If it's french it replaces {fr}....you text to write in french...{/fr} by ....you text to write in french...
If it's an other language it replace {fr}....you text to write in french...{/fr} by nothing
You need to do a rereplacer record for each language used in the site. Just change to language code in the case line.
VERY IMPORTANT :
1 - the search record is a regular expression : you need to tell it in the right part of the rereplacer form (if not, it wont work).
2 - You need to upload the Sourcerer plugin from NONUMBER.nl (another usefull plugin which allows to insert php directly inside a text).
3 - in the order of system plugin Rereplacer is to be placed before Sourcerer.
There are some rules to use with Sourcerer :
- don't use ',' . You need to replace it by
comma
- '<' is to be replaced by '['
- '>' is to be replaced by ']'