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

Slicing and not-slicing but using the same template(s).



hi
i have some websites which run under different languages
and some which have just one single language.
i use one(!) standard-templage as a basic layout for all(!) my
websites. on top of that i build the "local" templates 
for the certain sites. (two steps of abstraction).

the basic template just is:
#use wml::incl::pre_inc
#use wml::incl::header
<!-- Begin Contents -->
[PAGE_BODY:
<<PAGE_BODY>>
:PAGE_BODY]
<!-- End Contents -->
[PAGE_FOOT:
:PAGE_FOOT]
#use wml::incl::post_inc
.PAGE_BODY>>

the include-file "header" does use std::page and the
<page... tag. wherein the title, keywords, ... are defined.
<page title="... according to the different languages.

in pre_inc everything is defined which stands before the
include-line in the source-file, in post_inc typically the
divertions, so a simple source file would look:
#!wml -o %BASE.html
<set-var pagecolor="#fefefe">
#use wml::tmpl::stdpage
<subject="testpage">
Say Hello

Remember: 
1. I have sites which use just one single language,
so i use as a shebang-line: 
 #!wml -o %BASE.html
2. I do have sites with (partly) multilingual pages 
which use: (e.g.)
 #!wml -o (ALL-LANG_*)uLANG_DE:%BASE.html \
     -o (ALL-LANG_*)uLANG_FR:%BASE_f.html

BUT: i do like to use the same basic page template.
i do know that that runs me in some problems, but before i
update all my hundereds of sources to be pseudo-"multilingual"
like:
 #!wml -o (ALL-LANG_*)uLANG_DE:%BASE.html
and fix up my basic-template to generate multilingual pages
per se, i look for some patchy way.

i thought about it for some time and probably don't see the
easy way, so if anybody knows the answer, i'd appreciate if
that persons shares it with me.
basically i thought about using variable or divertions but
none of them do work:
A. i learned that i can NOT set variables <set-var...> this
way (assumed all prior definitions are set):
  <de: <set-var foo="deutsch">>
  <fr: <set-var foo="francais">>
because the slicing is done in pass 9 and the variable are
set in pass 2. it ends up with foo having the last value.
B. the same sad story with divertions. that does NOT work:
  <de: <foo="deutsch>>
  <fr: <foo="francais">>
because slicing in pass 9 and diverting in pass 5.

so how the heck can i put a value in variable
depending on the language which is generated?

if the answer is just a simple as "no" i have to go the
hard way.

thank you for your attention
 -jan



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