[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

RfD: Multi-Lingual Support

Hello WML-users,

I'm currently thinking about better high-level support for multi-lingual pages
with WML. The low-level WML way of doing this is to use slices (Pass 9) like
the following:

   #!wml -oUNDEFuEN:index.html.en -oUNDEFuDE:index.html.de
   [EN:Welcome][DE:Willkommen] !

Then a WML run automatically generated the two variants and in combination
with Content Negotiation in the webserver (e.g. Apache) the pages are
automatically selected.

What I now want is a higher-level interface to such multi-lingual variants
because the pure Slice-usage is a boring for human readers, I think.  So, my
request for discussion: 


I will write a wml::std::lang include file which should provide this
high-level interface, but first we have to discuss what it is.  My current
ideas of interface parts are one or more of the following (the "xx"
abbreviations are the ISO abbreviations for the languages):

1. | #use wml::std::lang
   | foo
   | <lang variants="en,de">
   | (en) Welcome (de) Willkommen !
   | </lang>
   | bar

   Here <lang> is a container tag which creates Area Substitutions
   like the following:
   In other words, it converts the above to

   | foo
   | [LANG_EN:Welcome ][LANG_DE: Willkommen !]
   | bar

   via Pass 6 (ASubst). Of course we can use any syntax instead
   of ``(xx)'' but we have to make sure it does not conflict with
   most plain text.

2. | #use wml::std::lang
   | foo
   | <lang:en "Welcome"><lang:de "Willkommen">!
   | bar
   Here wml::std::lang just defines simple tags named <lang:xx> which expand
   to [LANG_XX:%attributes]. The example then again gets

   | foo
   | [LANG_EN:Welcome][LANG_DE:Willkommen]!
   | bar

3. | #use wml::std::lang autoslice
   | [...]

   Here wml::std::Lang automatically select the used slices
   for additional output via
       %!slice -oALL-(LANG_*)+LANG_XX:index.html.xx [...]
   I've to add the asterisk feature to Pass 9, but this
   is useful for a long time now. So this should us not
   prevent from wanting this feature.

And more ideas, suggestions or comments on this topic?
Feel free to express any opinion you have.

                                       Ralf S. Engelschall
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com