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

Re: RfD: Multi-Lingual Support

rse@engelschall.com (Ralf S. Engelschall) writes:

Hi Ralf,

I currently do the following:

<define-container xx>

and then in my *.wml files I use


I think especially for longer sections of text I would almost prefer
an opening/closing-tag approach, I think this makes the input somewhat
more readable.

Of course, I have no strong feelings about which pass does the actual

I also use multi-linguals inside other tags, for example for the
hints-parameter in the <url> tag or also inside the <img> and <page>
tags. I think it would be important to make sure that this can be
done. I am not sure, but for that the ultimate substitution might have
to be in the last pass of the translation.


P.S.: I also noticed that in my approach I am having some difficulties
      with spurious spaces being inserted into the html-code when
      splitting the languages over several lines in the *.wml
      file. Could I overcome this with the <suck> tag or are those
      spaces introduced in pass 9? I guess I could just try ..., so
      far I use backslashes at the end of the line (but those tend to
      be forgotten ...)

> 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:
>       s/\(([a-z][a-z]\)(.+?)(\([a-z][a-z]\)|$)/'[LANG_'.uc($1).':'.$2/sge
>    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
>                                        rse@engelschall.com
>                                        www.engelschall.com
> ______________________________________________________________________
> Website META Language (WML)                www.engelschall.com/sw/wml/
> Official Support Mailing List                   sw-wml@engelschall.com
> Automated List Manager                       majordomo@engelschall.com

Dr. Fritz Zaucker, Head IT Support Group 
Departement of Electrical Engineering,      Federal Institute of Technology
ETZ J97, Gloriastrasse 35, 8092 Zurich, Switzerland
Tel.: +41-1-632-5241	Fax: +41-1-632-1194  http://www.ee.ethz.ch/~zaucker/
E-mail: zaucker@ee.ethz.ch (see home page for PGP key)
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com