opensubscriber
   Find in this group all groups
 
Unknown more information…

w : webmake-talk@taint.org 8 August 2005 • 6:36AM -0400

[WM] Outputing multilingual files
by Warren Post

REPLY TO AUTHOR
 
REPLY TO GROUP



I am modifying an existing working .wmk file to turn a monolingual site
into a bilingual one. I believe I have the lang_tag plugin working
properly, but my output code -- which worked fine as a monolingual site
-- is no longer working as expected. The relevant portion of my .wmk
file is:

<!-- begin code sample -------------------------->

<!-- define location of source files ------------>

<contents src="../src"
          name=".../*.txt"
          namesubst="s/.txt//"
          listname="srcfiles"
          format="text/html"
/>

<!-- create output files ------------------------>

<template name="curlang">es</template>
<attrdefault name="lang"
             value="${curlang}" >
<for name="out"
     values="${srcfiles}">
  <out file="${out}.${curlang}.html"
       name="${out}"
       clean="pack addimgsizes fixcolors indent">
    ${header_es}
    ${${WebMake.OutName}}
    ${footer_es}
  </out>
</for>
</attrdefault>

<template name="curlang">en</template>
<attrdefault name="lang"
             value="${curlang}" >
<for name="out"
     values="${srcfiles}">
  <out file="${out}.${curlang}.html"
       name="${out}"
       clean="pack addimgsizes fixcolors indent">
    ${header_en}
    ${${WebMake.OutName}}
    ${footer_en}
  </out>
</for>
</attrdefault>

<!-- end code sample ------------------------------->

First, source files are defined. They are in the ../src directory or
subdirectories thereof, and have the extension .txt. One source file
corresponds to one html output file in each language (e.g. foo.txt maps
to foo.en.html and foo.es.html). This part is unchanged from my working
monolingual site code, and seems to be working as desired.

Then output files are created. Here I took my working monolingual site
code and ran through it twice, first for Spanish (es) and then for
English (en). The English pages (last to be output) are made as
expected, but the Spanish pages are made with English headers and
footers. If I reverse the order of output (English first, then Spanish)
the problem is reversed: the Spanish pages are fine and the English ones
have Spanish headers and footers.

Presumably my output files section is buggy but I can´t for the life of
me spot what my problem is. Any ideas?

TIA,
--
Warren Post
Santa Rosa de Copán, Honduras
http://srcopan.vze.com/

_______________________________________________
WebMake-Talk mailing list
WebMake-Talk@tain...
http://webmake.taint.org/mailman/listinfo/webmake-talk

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

opensubscriber is not affiliated with the authors of this message nor responsible for its content.