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

Re: Multi Language Support Question


Karl-Heinz Marbaise wrote:
> Can I define a default behaviour if no slice is defined
> in a file, because some parts of my project become
> very complicated.

I had that problem, too. My solution was to call <lang:new xx> only if
the language is really used. For templates, which have <xx> though, I
do a <let xx=comment>:

In the header of each content file I can set the variables deutsch resp.
englisch to "no", which indidcates, that no german resp english
version should be generated. They also have defaults:

<defvar DEUTSCH "yes" />
<defvar ENGLISCH "yes" />

Then I call <lang:new ...> depending on the value of that variables.

<ifeq <get-var DEUTSCH /> "yes"
      "<lang:new id=de short />"
      "<let DE=COMMENT>" />
<ifeq <get-var ENGLISCH /> "yes" 
      "<lang:new id=en short />"
      "<let EN=COMMENT>" />

But, you're right, it would be nice, to have some slice options to
  a) produce no file, if the appropriate slice (or slice term) is
     empty (or perhaps just contains white spaces) and
  b) produce no file, if the appropriate slice doesn't exist.

Those options should IMHO be appliable a) to each -o solely and b) to
all -o's

That would make things a lot easier...

		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