Basic UsageThe basic usage is similar to
wml::des::navbar. Most normal navbars should also work with
The preparation for splicing is mostly done by
navbar:render (something may happen during the definition
if a language is defined with the short attribute, but
navbar-FH.wml should take care of this).
navbar-FH.wml produces splices for all languages that are
navbar:render is called.
Specifying Language VersionsThe
navbar:buttontake a syntax that is similar to languages defined with the short attribute. In addition, a default value may be specified similar to the
navbar:button now have a syntax similar to
lang:star:href:, except that the character
is used for language substitution, since
* is already
used for the
img given is relative, the
link will be set to the default page, unless the language specific
page exists. As a result, you may have to run
twice if you add a version of a page in a new language.
If you don't use the automatic
button creation facility you better take care that at least the
default images exist, if you use images at all.
navbar:button definition might look like this:
<navbar:button url=index.#.html|index.html img=ind.#.*.png|ind.*.png txt="<de: Leitseite><en: Homepage>|Leitseite">If a default language is defined (see below), you may omit the specific definition for this language:
<navbar:button url=index.#.html|index.html img=ind.#.*.png|ind.*.png txt="<en: Homepage>|Leitseite">or you may omit the default and the specific definition for that language will be used as the default:
<navbar:button url=index.#.html|index.html img=ind.#.*.png|ind.*.png txt="<de: Leitseite><en: Homepage>">Otherwise, the first specified language will be used as the default, ore the whole string if
navbar-FH.wmlcan't find anything it understands.
Note that all these attributes should only contain plain text and no other tags!
Default LanguagesThere is a new attribute
navbar:defineIf set, the default values of all parameters are used for this language, instead of the properly substituted ones. Say, you have a button with
img=ind.#.*.png|ind.*.png, and you generate slices for
es. This will normally give you html-files with references to
ind.en.n.pngand so on, if these images exist or are created, and to
ind.n.pngetc. otherwise. If you set
defaultlanguage=de, all occurences of
ind.de.*.pngetc. will also be replaced by
ind.*.png. Similarily you can have
<name>.htmlfor the german pages and
<name>.en.htmlfor the english pages, and in case a page is not available in all languages, things should fall back to the default language fairly automagically.
This may or may not be a useful feature depending on your
I implemented it because my site is mostly all german and I didn't
want to change the existing urls of the type
when I translated some of my pages.
Strange ThingsThere is an attribute
navbar:render, which allows you to produces navbars for splices in languages that are not defined in your document. It's probably pretty useless, but it was easy to implement, and you never know.