You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by David Luyten <DL...@isabel.be> on 2003/10/31 15:54:04 UTC

i18n problem

Hello,
 
I am using Cocoon 2.1 (under Tomcat/Win2000).
 
I have a problem with some piece of text translated with cocoon/i18n:
 
here is the text:
 
<i18n:text i18N:key="somelink">Click <link href="/test/otherpage">here</link> to view</i18n:text>
 
and here is the entry in message bundle:
 
<message key="somelink">Cliquez <link href="/test/otherpage">ici</link> pour pour visualiser.</message>
 
and the xsl modification rule:
 
<xsl:template match="link">
  <a href=" {@href}">
   <xsl:apply-templates/>
  </a>
 </xsl:template>
 
---
 
The translation works but in the result, the href value is always empty. 
I have tested without XSL transformation, it works fine.
 
 
Could you help me?
 

D@vid <ma...@isabel.be> 

  _____  

David Luyten
Webmaster
dluyten@isabel.be 

Tél. : +32 (02) 545.17.78  Fax. : +32 (02) 545.17.19
Isabel SA
13/15 Bd de l'Impératrice  
B - 1000 Bruxelles
Web : www.isabel.be <http://www.isabel.be/> 

  _____  

DISCLAIMER : Confidential information may be contained in this message and it may be legally privileged. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Isabel shall be understood as neither given nor endorsed by it. Messages and attachments are swept by a virusscanner. If this message contains password-protected attachments, the files have not been scanned for viruses by the Isabel mail domain. Always scan attachments before opening them>.


Isabel

Re: i18n problem

Posted by an...@tnoo.net.
> <message key="somelink">Cliquez <link href="/test/otherpage">ici</link> pour pour visualiser.</message>

Try <message key="somelink" complex="true">Cliquez <link href="/test/otherpage">ici</link> pour pour visualiser.</message>
                            ^^^^^^^^^^^^^^
I haven't seen it documented, but it works for me.

HTH

Tinu

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: i18n problem

Posted by Konstantin Piroumian <kp...@apache.org>.
This should work in Cocoon 2.1 or newer. In older versions nested tags don't
work.
Also, it seems that you have typo in namespace prefix (should be i18n not
i18N).

Regards,
  Konstantin


----- Original Message ----- 
From: David Luyten
To: users@cocoon.apache.org
Sent: Friday, October 31, 2003 17:54
Subject: i18n problem


Hello,

I am using Cocoon 2.1 (under Tomcat/Win2000).

I have a problem with some piece of text translated with cocoon/i18n:

here is the text:

<i18n:text i18N:key="somelink">Click <link
href="/test/otherpage">here</link> to view</i18n:text>

and here is the entry in message bundle:

<message key="somelink">Cliquez <link href="/test/otherpage">ici</link> pour
pour visualiser.</message>

and the xsl modification rule:

<xsl:template match="link">
  <a href="{@href}">
   <xsl:apply-templates/>
  </a>
 </xsl:template>

---

The translation works but in the result, the href value is always empty.
I have tested without XSL transformation, it works fine.


Could you help me?

D@vid

David Luyten
Webmaster
dluyten@isabel.be Tél. : +32 (02) 545.17.78  Fax. : +32 (02) 545.17.19
Isabel SA
13/15 Bd de l'Impératrice
B - 1000 Bruxelles
Web :www.isabel.be

DISCLAIMER : Confidential information may be contained in this message and
it may be legally privileged. If you are not the addressee indicated in this
message (or responsible for delivery of the message to such person), you may
not copy or deliver this message to anyone. In such case, you should destroy
this message and kindly notify the sender by reply email. Please advise
immediately if you or your employer does not consent to Internet email for
messages of this kind. Opinions, conclusions and other information in this
message that do not relate to the official business of Isabel shall be
understood as neither given nor endorsed by it. Messages and attachments are
swept by a virusscanner. If this message contains password-protected
attachments, the files have not been scanned for viruses by the Isabel mail
domain. Always scan attachments before opening them>.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org