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

including files depending on language

       I'm quite new to this, so.... (if there is a mailing list
       archive, it would help me a lot... anyone?)

       is it possible to make something like this (i know this won't
       work; this is just the easiest way to explain):

#use wml::std::lang

<lang:new id=en short>
<lang:new id=de short>


#include incl.*.wml


       incl.de.wml and incl.en.wml already exist.

       Or (very short): how to include different files, depending on

       Longer explanation

       Let's say we have to build a page in three different languages
       (en, de, fr) but material in French is not ready yet. So, we
       create some 'modules' in order to easy add French language,
       like this:

#use wml::std::lang
#include 'language.list.wml'

#include headers/header1.*.wml

#include toolbars/toolbar.*.wml

etc etc

       File 'language.list.wml' looks like this:

<lang:new id=en short>
<lang:new id=de short>

       ...and directories 'toolbars' and 'headers' are fulfilled with
       files called header1.de.wml, header1.en.wml, toolbar.de.wml,
       toolbar.en.wml etc... each with appropriate content.

       The pages are generated with -o option (there is no shebang
       line on the beginning of the file).

       After finishing French lang. material, we just add the files
       into the appropriate directories, add <lang:new id=fr short>
       to 'language.list.wml' and 'recompile' the pages for French

       Maybe #include command can be somehow emulated (with perl or
Davor Cengija
Doktore, malo sam neodlučan... a možda i nisam...
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com