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

Re: Navbar in two languages

On Sun, 7 Nov 1999, Wolfgang Dautermann wrote:

> Hi,
> I try to make a webpage in german and english. There is a navbar at the
> left and I try to use different images in the german and english version.
> But neither
> # 1st try
> <de>  
>   <navbar:button id=kultur url="$(ROOT)/kultur/" txt="Kultur" 
>                  img=navbar-kultur-*.gif>
> </de>
> <en>
>   <navbar:button id=kultur url="$(ROOT)/kultur/index.en.html" txt="Culture"    
>                  img=navbar-kultur-en-*.gif>
> </en>
> nor
> # 2nd try
> <navbar:button id=suche url="$(ROOT)/search/<en: index.en.html>"
> txt="<de: Suche><en: Search>" img=navbar-suche-<en: en->*.gif>
> works as I want. In my first attempt wml prints both the "Kultur" and
> "Culture" button (in both languages), in my second attempt wml refuses to
> load the images (It  seems that txt="<de: Suche><en: Search>" does work
> correctly, but not the  img=navbar-suche-<en: en->*.gif> - part).
> My question now is: How is the correct way to generate multi-language
> navigation bars? Is ist possible?

This one works:
  <navbar:button id=suche
                 url="$(ROOT)/search/<en: index.en.html>"
                 txt="<de: Suche><en: Search>"
                 img=navbar-suche-<protect pass=3><en: en-></protect>*.gif>

But i prefer this syntax:
  <navbar:button id=suche
                 url="<lang:star: $(ROOT)/search/index.*.html>"
                 txt="<de: Suche><en: Search>"
                 img=navbar-suche-<lang:star: *>-*.gif>

In this case, you have to change the filenames of the German version
to index.de.html, navbar-suche-de-std.gif,....

An alternative is to define one navbar by language and write
  <en><navbar:render name=main-en></en>
  <de><navbar:render name=main-de></de>

Denis Barbier
WML Maintainer

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