XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
jagadeesh sridharSubject: Dynamic i18n translation
Author: jagadeesh sridhar
Date: 15 Jun 2006 03:05 AM
Hi

We are using Cocoon 2.1(Web publishing Framework)

We have some problem in getting the i18n content in pages.

If we hardcode the key value like for instance, <i18n:text>input-text</i18n:text> then the translated value is getting printed (for example “output-text”),

For Example: input-text is ‘home’ corresponding value is ‘Espana’ in message.xml [ <message key=”home”>Espana</message>]

But if we try to get the key value from xsl variable, like

<i18n:text><xsl:value-of select=”$variable”/></i18n:text> it’s not working although the $variable contains the value as ‘home’. The output comes as “home”.

But the expected result is ‘Espana’

Could you please help us to resolve this problem?

We will be very grateful to you if you could help us as soon as possible.

- Regards,

Jagadeeswaran.S

Posttop
Minollo I.Subject: Dynamic i18n translation
Author: Minollo I.
Date: 15 Jun 2006 09:21 AM
You need to get to the value of <message>, not the value of @key; something like:

<i18n:text><xsl:value-of select=”message[@key='home']”/></i18n:text>

Not sure what your XSLT input context is at that point though.

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.