You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Hong Gia Dinh <hg...@sdcgrp.com> on 2002/12/27 04:43:14 UTC
using !!!!!!!!!!
Hi all,
I got this problem in using i18n:attr, i read I18n:transformer and try to
use it but it does not work!!! :( , i also try to find answers in mail
archives but the answers seem not work for me too so ...
i want to have different languages on my buttons (input type="submit") when
i changing languages on my pages although i can change the remains of the
pages!!!
i defined an xml file with
<create><i18n:text i18n:key="create">Create</i18n:text></create>
in my xsl file :
i tried cases like these:
1. <input type="submit" name="create" value="create" i18n:attr="value"/>
2. <input type="submit" name="create" value="{create}" i18n:attr="value"/>
3. <input type="submit" name="create" value="create" i18n:attr="{value}"/>
but i just display 'create'!!! not Create in english and TM in VN
and when i press the button it informs errror:
Undeclared prefix in name: "i18n:attr".
description org.apache.cocoon.ProcessingException: Exception in creating
Transform Handler: org.xml.sax.SAXParseException: Undeclared prefix in name:
"i18n:attr".
sender org.apache.cocoon.servlet.CocoonServlet
source Cocoon servlet
stack-trace
so now i dont know how to deal with it??!!! :(
do you know how to solve it??
Thanks so much !!!
Re: using !!!!!!!!!!
Posted by Konstantin Piroumian <kp...@apache.org>.
using <i18n:attr>!!!!!!!!!!You should place attribute translations in a dictionary file in the same format as for all the other elements. Attribute translations are not different from the rest. They just use special syntax to get the values.
There *a lot* of sources about i18n where you could get answers for most of the cases:
Internationalization docs: http://xml.apache.org/cocoon/userdocs/transformers/i18n-transformer.html
i18n samples in Cocoon source at: /src/webapp/samples/i18n/
I18n transformer JavaDocs: http://xml.apache.org/cocoon/apidocs/org/apache/cocoon/transformation/I18nTransformer.html
LocaleAction JavaDocs: http://xml.apache.org/cocoon/apidocs/org/apache/cocoon/acting/LocaleAction.html
I hope they outline all the dark sides of Internationalization and localization in Cocoon. You just have to read them carefully.
Konstantin
----- Original Message -----
From: Hong Gia Dinh
To: cocoon-users@xml.apache.org
Sent: Friday, December 27, 2002 06:43
Subject: using <i18n:attr>!!!!!!!!!!
Hi all,
I got this problem in using i18n:attr, i read I18n:transformer and try to use it but it does not work!!! :( , i also try to find answers in mail archives but the answers seem not work for me too so ...
i want to have different languages on my buttons (input type="submit") when i changing languages on my pages although i can change the remains of the pages!!!
i defined an xml file with
<create><i18n:text i18n:key="create">Create</i18n:text></create>
in my xsl file :
i tried cases like these:
1. <input type="submit" name="create" value="create" i18n:attr="value"/>
2. <input type="submit" name="create" value="{create}" i18n:attr="value"/>
3. <input type="submit" name="create" value="create" i18n:attr="{value}"/>
but i just display 'create'!!! not Create in english and TM in VN
and when i press the button it informs errror:
Undeclared prefix in name: "i18n:attr".
description org.apache.cocoon.ProcessingException: Exception in creating Transform Handler: org.xml.sax.SAXParseException: Undeclared prefix in name: "i18n:attr".
sender org.apache.cocoon.servlet.CocoonServlet
source Cocoon servlet
stack-trace
so now i dont know how to deal with it??!!! :(
do you know how to solve it??
Thanks so much !!!