[pmwiki-users] MultiLanguage --- again (setting default language)

blues blues4u at supereva.it
Tue Feb 6 03:05:38 CST 2007


On Mon, 05 Feb 2007 19:13:51 +0200, Tom Lederer <celok at gmx.net> wrote:
>>> 1. i still somewhat desperatly search for a way to define the default
>>> language of a site in a fashion that if there is no (:if userlang
>>> XX:) is in a page, it is clear to the script that the page is in my
>>> default language (German for me). I noticed that (:if userlang XX:)
>>> in SideBar, GroupHeader, etc... do have no effect.
>>
>> the fact here (that others also misunderstand) is that a text that is
>> not included in a (:if:) branch does NOT mean that it is in the
>> default
>> language.
>> consider the following (your default language is german):
>>
>> (:if userlang en:)
>> text in english
>> (:if userlang de:)
>> text in german
>> (:if:)
>> text for ALL languages
>>
>> as you see the text that is outside the (:if:) branches is NOT
>> the default language but displayed for ALL languages.
>>
>
> Isn't that "unnatural"? I would assume that every page has a certain
> default language, that would serve as fallback. However. If it is
> that way, then that's the way it is ;)
>

i know it may look "unnatural" but i couldn't come up with a better
solution for this. and as you may imagine i spent quite a lot of
time on this recipe.
the main problem maybe is the fact that i decided to use the (:if:)
conditionals, since they are already in the core, but this implies
that the text that is outside the (:if:)s is always displayed.
the best workaround is of course to define in every page at least
a language... this may be a pain for existing wikis, but for new
ones it can be a good thing after all.

blues




More information about the pmwiki-users mailing list