stylesheets ans NLS

Subject: stylesheets ans NLS
From: Jany Quintard <quintard.j@xxxxxx>
Date: Mon, 17 Apr 2000 13:04:22 +0200 (CEST)
Hi all
I am having an internationalization problem with my stylesheets. I can
see some possible solutions, but I wonder if there would not be better
ones.
The problem is that stylesheets contains literals and that we want
to be able to output them in one or another language, according to labels
and that we want to output files in several languages.
The input SGML file contains an entity xoLang coding the language code
(two characters as defined in ISO639).

The question is : How can we choose the labels at run time ?
I can see some possibilities :
1 - hard code the tests where labels are used :

(let (codlang (entity-text "xoLang"))
.../...
    (literal
      (if (equal? codLang "fr")
          "Table des matières"
          (if (equal? codLang "en")
              "Table of contents"
              (debug (string-append "No translation for " codLang)))))
.../...
)
It is simple be not very good, not easy to maintain etc...

I'd rather have the labels in an external file (a stylesheet or an
entity file). The labels could be stored in a set of lists of value-name
pairs (or lists)). The retrieval of labels should imply some loops to
explore the set of lists.

The entity solution would be the best (I believe). But I can't
manage to see a method to load to the entity file corresponding to the
language coded in xoLang.

Did anyone face (and solve) this sort of problem before ?
Do you see any better solutions ?

Jany.


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread