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

Re: Multi Language Support Question


Karl-Heinz Marbaise wrote:
> #use wml::std::lang
> <lang:new id=en short>
> <lang:new id=de short>
> <lang:star:slice: <get-var WML_SRC_BASENAME>-*.html>
> <h1>Dass ist die Foo Seite</h1>
> like the above, but it produces an error message which
> says there is slice defined.

If there are only <de>'s or only <en>'s in a file, the situation is
clear. But, if none of them are used (means defined in the end), there
are two solutions:

a) No output at all (this is sometimes useful IMHO)

b) All files should be generated, all with the same content. (This is
   probably a useful default.)

Regarding my interface suggestion (see other mail in same thread), I
must admit that an option like "-u" with the semantic "*u*ndefined
slices are treated as empty slices." should also exist.

So in this case, the shebang line could read

#!slice -u (ALL-LANG_*)+LANG_DE:test-de.html -u (ALL-LANG_*)+LANG_EN:test-en.html

for the first syntax suggestion. And for the second one, we probably
would use the uppercase form of "-u":

#!slice -U -o (ALL-LANG_*)+LANG_DE:test-de.html -o (ALL-LANG_*)+LANG_EN:test-en.html

Alternatively, we could write:

#!slice -ou (ALL-LANG_*)+LANG_DE:test-de.html -ou (ALL-LANG_*)+LANG_EN:test-en.html

Actually, after this example, I begin to prefer the second syntax
variant. It's more consistent.
		Regards, Axel
Axel Beckert - abe@cs.uni-sb.de - http://abe.home.pages.de/
Student of Computer Science, University of Saarland (Germany)
Artificial Intelligence Laboratory (AI Lab), Prof. Dr. W. Wahlster;
WWW-/FTP-Administrator IBFI Schloß Dagstuhl; Students Representative CS
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com