[pmwiki-users] MultiLanguage --- again (setting default language)
Jiri Hladůvka / OBUTEX
admin at obutex.com
Tue Feb 6 03:44:09 CST 2007
When looking into my pages file source (using text editor) where (:if
userlang ...:) is present I can see the line
languages=cs,sk,en
before the text:
What about to generate in a new page or edited page (as a ROS event)
such a line with the default language regardless
on the presence of the (:if userlang ...:) markup if in local/config.pgp
languages are defined ?
This would enable language selection and translations of $[phrase] even
if the (:if userlang ...:) is not present
and the (:selectlang:) is in the SideBar or Site.PageHeader.
Am I right?
Has such a functionality be in the PmWiki core ? Or some lines in
local/config.pgp do that job?
Regards,
Jiri
blues napsal(a):
> 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
>
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
> __________ Informace od NOD32 2039 (20070205) __________
>
> Tato zprava byla proverena antivirovym systemem NOD32.
> http://www.nod32.cz
>
>
>
>
--
OBUTEX s.r.o
Ing.Jiří Hladůvka
Zlatovská 22
911 01 Trenčín
tel.: +421 (0)32 6587000
mailto:admin at obutex.com
http://www.obutex.com
More information about the pmwiki-users
mailing list