[pmwiki-users] multilanguage redesign (was: PageNotFound translation)
sgp
acs322000 at yahoo.com
Tue Feb 13 17:43:08 CST 2007
Patrick R. Michaud wrote:
> 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?
>
Most of my pages mix language with tables and links, so they're always fairly complex.
It's like writing several conditional pages into one. There are two ways to do it:
(:if lang A:)
complete page for lang A
(:if lang B:)
complete page for lang B
...
(:if:)
and
(:if lang A:)
section 1 for lang A
(:if lang B:)
section 1 for lang B
...
(:if lang A:)
section 2 for lang A
(:if lang B:)
section 2 for lang B
...
(:if:)
I use the second form when a page contains something more than simple text, like tables, conditional
formatting, etc. The second form is easier to maintain in that case, although you have to write more.
I often wish I had a way to select from an inline dictionary, something like (made-up syntax):
[hello|hola|hallo][en|es|de]{$userlang}
meaning, use 'hello' when userlang==en, 'hola' when userlang==es, 'hallo' when userlang==de
this would come very handy when translating i.e., link text [http://| linktext] in a concise form
More information about the pmwiki-users
mailing list