Fwd: Re: [Pmwiki-users] Re: MulitLanguage

Knut Alboldt pmwiki
Sun Nov 7 15:13:29 CST 2004


>Date: Sun, 07 Nov 2004 15:13:14 +0100
>To: Raul 'Graphity' Pinto <pmwiki-user at graphity.info>
>From: Knut Alboldt <pmwiki at alboldt.de>
>Subject: Re: [Pmwiki-users] Re: MulitLanguage
>
>At 13:04 07.11.2004, you wrote:
>>Knut Alboldt wrote:
>>>just use XLPages of the different languages. The language again could be 
>>>determined in the way described above.
>>
>>Can I use the XLPages from pmwiki v1 for v2? On the page 
>>http://www.pmwiki.org/pmwiki2/pmwiki.php/PmWiki/Internationalizations it says:
>>You can download an archive of these translations from 
>>http://www.pmichaud.com/pub/pmwiki/i18n.tgz (-not yet existing for V2-).
>>
>>Or should I just try and tell you my problems :-)
>
>I took the one from v1 and used it in v2 I think at least there is a 
>XLPagesDe in the v2 cookbook or somewhere else (I'll have a look this 
>evening). Additional I've build my own XLPage (like in v1). I'll grap it 
>all together this evening and post it to you.
>I've to check my config.php, if there has to be done something else.
>
>til later. (have to leave for a tea now :-)

ok, that's what I found out:
1) I took the v1-translations from http://www.pmichaud.com/pub/pmwiki/i18n.tgz
There is a new page for German in v2: 
http://www.pmwiki.org/pmwiki2/pmwiki.php/PmWikiDe/XLPage, if you need 
german, add this after unpacking the archive.

2) added the following statements into config.php:
   XLPage('de','PmWikiDe.XLPage');       # from i18n.tgz
   XLPage('de','PmWikiDe.XLPageLocal');  # my local translations

to use it switchable I suggest using $userlang instead of 'de'  and 
PmwikiXx instead of PmWikiDe (so either for this you translate the first 
char of $userlang into uppercase or implement a conditional setting like

if ($userlang=="de")  {
   XLPage('de','PmWikiDe.XLPage');       # from i18n.tgz
   XLPage('de','PmWikiDe.XLPageLocal');  # my local translations
}
elseif ($userlang=="fr")  {
   XLPage('fr','PmWikiFr.XLPage');       # from i18n.tgz
   XLPage('fr','PmWikiFr.XLPageLocal');  # my local translations
}
# default will be en ?

The statements above must be included _after_ including 
cookbook/multilanguage.php in config.php.

Anything else that's not translated into the user's choosen  language can 
be added on page PmWikiXx.XLPageLocal

-Knut 




More information about the pmwiki-users mailing list