[pmwiki-users] multilanguage redesign (was: PageNotFound translation)

Patrick R. Michaud pmichaud at pobox.com
Tue Feb 13 15:36:01 CST 2007


On Tue, Feb 13, 2007 at 10:09:31PM +0100, Tom Lederer wrote:
> In addition to that i would wish (as we should make a wish list :)  
> for a default language, in that manner, that the default langugae is  
> assumed if no other statement is given. 

I've been thinking we might do this with (:elseif:)/(:else:) clauses,
as in:

    (:if     lang en:) English text
    (:elseif lang fr:) French text
    (:elseif lang de:) German text
    (:else:) Default text
    (:if:)

Or, perhaps what we really want is a good old-fashioned "case" statement:

    (:case lang en:) 
    English text
    (:case lang fr:)
    French text
    (:case lang de:)
    German text
    (:case default:)
    Default text
    (:caseend:)

Then perhaps we just make (:lang ...:) into a shorthand for
(:case lang ...:), so then the author can write:

    Text common to all languages
    (:lang en:)
    English text
    (:lang fr:)
    French text
    (:lang de:)
    German text
    (:lang other:)
    Text for languages other than en, fr, de
    (:langend:)
    Text common to all languages

The biggest issue with something like "case" or "lang" is knowing how 
they might interact with (:if:).  Mixing (:if:), (:case:), and (:lang:)
in a page is likely to cause a lot of confusion and frustration for
authors and admins.  So perhaps we'd be best served by sticking to 
an if/elseif/else/ifend form, at least in the beginning.

Thoughts?

Pm



More information about the pmwiki-users mailing list