Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: tool for managing XSL variables in different languages? >Thread Next - Re: tool for managing XSL variables in different languages? Re: tool for managing XSL variables in different languages?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 | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
