[pmwiki-users] a shortcut to switching languages in MultiLanguage

alglt at yahoo.com alglt at yahoo.com
Wed Sep 26 16:14:24 CDT 2007


Good day, list.

When using the MultiLanguage recipe, a page editor has to use the markup
(:if userlang xx:)
to switch to a different language. It is, I believe, quite tedious
when translating a caption of an image to three languages, for example.

Is there any sane reason why a line like this isn't used in
multilanguage.php, to provide markup like (:en:) for language switching:

foreach ($DefaultLanguages as $lang)
{
    Markup($lang, '<if',
            "/\\(:$lang:\\)(.*)(?:\\(:(".implode('|',
                            $DefaultLanguages)."|if):\\))?/Us", 
            "(:if userlang $lang:)$1");
}

or s/\$lang/l_$lang/ to avoid conflicts with other recipes?


Thanks,
Algardas Pelakauskas



More information about the pmwiki-users mailing list