On 26 Dec 2000, David N. Welton wrote:
> > On 24 Dec, David N. Welton wrote:
> 
> > >> ::lang - a namespace - for negotiating languages on the fly
> > >> (ie. if there's a text in english, german and french, then
> > >> depending on user browser's settings, best language is selected)
> Just out of curiousity, how does this differ from Apache's normal
> content negotiation stuff (which works with .ttml pages)?

you just put something like
<+ hputs [::lang::bestlang pl {
    tekst po Polsku 
  } de {
    text in Deutsh 
  } en {
    text in English
  }] +>

Or, a bit more complex "variant":
<+ switch [::lang::langmatch [list en pl de] {
   pl {
     +>
     tekst po Polsku
     <+
   }
   en {
     +>
     text in English
     <+
   }
   de {
     +>
     text in Deutsch
     <+
   }
} +>

The second allows commands - which is why I prefer it. But the first looks
nicer :)

Anyway, the difference is significant: apache allows negotiating entire
pages, ::lang allows choosing best language for specific
paragraphs/parts... Which is imho much better...

Wojciech Kocjan
(.sig left on another machine ;)



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to