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

slices: <img> and <set-var> problem (again)

until now i run into two major "flaws" with slices
and those two are bothering me (and sooner or later you if
you want to create multilingual sites). the problem is,
that slicing must(!) be done after all other passes,
because the file "splits up" in several files.
i know a (very unelegant) way to work around the 
<set-var>-problem. but it leads to very redundant code in 
the templates and much more variable-settings in my 
the <img>-problem ist relatively easy to solve: just run
htmlfix manually over the outputs after wml is done.

the example, let's say we have:

#!wml -o (ALL-LANG_*)uLANG_DE:%BASE.html \
    -o (ALL-LANG_*)uLANG_FR:%BASE_f.html

#use wml::std::lang
<lang:new id=de short>
<lang:new id=fr short>

# first problem:
<set-var foo = <de: yes><fr: no>>
<if <match <get-var foo> "no">
"french is set to no"
"german is set to yes"
# second problem:
<img src="$(ROOTIMG)/t_akt<de: ><fr: _f>_lo.gif">

the text is always: "french is set to no"
and the <img> is missing height and width.

after pass 6 part of the code is:
<img src="images[LANG_DE::][LANG_FR:_f:].gif">
no chance for htmlfix to get to its data.

i think we should really think about that, since the sites
get more and more graphically designed and having at least
an english version next to your main language gets more and
more common too.

comments please.


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