[Pmwiki-users] Wikis with multiple languages

Eike Decker eike
Sun Jan 11 19:14:07 CST 2004


Hi

Introduction: 
I have set up a couple of PMwikis till today and most of them had the
requirement to support multiple language - the visitor should be able to switch
the displayed language of the whole page. There were only two solutions for me
and I tried both: One is to set up different groups for the different languages
by appending the language letters (de / fr / en ... ), but with exactly the
same
pagenames to switch without problems between the languages. The other way is,
to
include all wanted languages in a single wikipage with a special syntax. 
Both methods have advances and disadvantages. For me, I prefer to include the
languages in one file since it is much easier to maintain because everything is
kept close together. On the other hand, it looks more ugly to for the user if
he
edits the page. 
However, this feature is one of the most wanted wishes by the people I am
working for (normally they want to present their pages in their own language
and in english).

So I would like to discuss about this feature, since I have to use a special
syntax and I am not an advanced PHP programmer.
As said before, I would prefer to include all the languages in one file -
currently I do this by using a syntax like the divider (----): 5 dollars plus
the language code mark the following lines as the chosen language in a single
line - for example
'$$$$$de' choses german, '$$$$$en' english and '$$$$$default' marks parts that
are always shown. 
The problem for me was to enable this kind of feature - I only managed to do
this by modifying the printtext() function which is currently cutting the
unwanted language parts simply away (additionally it stores the available
languages in a variable to chose one of them). But I guess that should be also
possible by using the
regex functions provided by you (maybe you can give me a hint ;)).
Last but not least the wiki has to remember the chosen language and thatfor
I've
chosen the phpsessions.

So my first problem here is: Is the syntax well chosen or not?
And the second problem is: Can you give me a hint to implement this a little
bit
better (completly in an external php file)?
And is there a way to connect all this with the internationalizations from the
cookbook? Currently the pmwiki documents are seperatly translated into groups
with the language strings appended (PmWikiDe / PmWikiFr ...). So there's a
little contradiction to my prefferred model...

So what do you think about all this?

best regards
Eike Decker



More information about the pmwiki-users mailing list