Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: tool for managing XSL variables in different languages?

From: Sebastian Kerekes <sebastian.kerekes@---.--->
To: NULL
Date: 9/2/2004 2:26:00 PM
Marrow wrote:

> Hi,
> 
> Using variables and including them?  That seems a long way to do things?
> 
> Show a short example of what you are doing - perhaps there's a better way of
> achieving your goal. ;)

Ok, here's a very simple and short example:

Somewhere at the top of the document i have my variables. The variables 
need to have different content depending on the language I want to use. 
So my XSL is a JSP file that gets a "language" parameter and includes 
the file with the right language.

When the JSP finishes processing, the result is a XSL with for the 
specific language passed with "language". For "en" the result is:


<xsl:variable name="text.greetings" select="'Username'" />
<b><xsl:value-of select="$text.greetings" /></b>

for "de" it's:

<xsl:variable name="text.greetings" select="'Benutzername'" />
<b><xsl:value-of select="$text.greetings" /></b>

and so on.

I found this approach in a book, and it seems ok to me, but if you have 
any other (more common, more elegant) solutions, feel free to post them ;)

 > To your original question...
 > You could use XSLT itself to perform the checks to ensure that a word is
 > defined in each language.

Uuuhm .. how? How would you solve this?

Greetings, Sebastian


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent