You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Bernard Sirius <be...@yahoo.com> on 2005/01/30 18:11:50 UTC

problem with i18n dictionary

using cocoon 2.1.5, java 5, tomcat 5 on windows xp pro

my problem:
Unable to locate resource: core (key [core])

however, the problem arises only when locale=fr. I've
tried that with the input-module method and the
locale-action method to determining the locale in the
sitemap. Modifying the english dictionary reflects in
the generated XML, but the french dictionary keeps
generating the error.

The english dictionary is located at
dictionaries/core_en.xml
and the french dictionary at dictionaries/core_fr.xml
I've even tried to create a french dictionary at
dictionaries/core.xml but it's not found either

the french dictionary:
<catalogue xml:lang="fr">
  <message key="name">Nom</message>
  ...
</catalogue>

I've tried xml:lang="fre" without success.

sitemap config:

    <map:transformers>
      <map:transformer name="i18n"
          
src="org.apache.cocoon.transformation.I18nTransformer">
        <catalogues default="core">
          <catalogue id="core" name="core"
location="dictionaries"/>
        </catalogues>
       
<untranslated-text>untranslated</untranslated-text>
        <cache-at-startup>true</cache-at-startup>
      </map:transformer>
    </map:transformers>
    <map:actions>
      <map:action name="locale"
src="org.apache.cocoon.acting.LocaleAction">
        <locale-attribute>locale</locale-attribute>
        <use-locale>true</use-locale>
        <default-locale language="en" country="US"/>
        <store-in-request>false</store-in-request>
        <create-session>false</create-session>
        <store-in-session>true</store-in-session>
        <store-in-cookie>false</store-in-cookie>
      </map:action>
    </map:actions>


sitemap matcher:

      <map:act type="locale">
        <map:match pattern="**/*.jx">
            <map:generate src="data/{1}/{2}.jx"
type="jx"/>
             <map:transform type="i18n">
               <map:parameter name="locale"
value="{../locale}"/>
             </map:transform>
            <map:serialize type="xml"/>
        </map:match>
      </map:act>

I'm confused... any idea?

bernard


		
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 


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


Re: problem with i18n dictionary

Posted by Marc Salvetti <ma...@notremanou.net>.
You can try adding a <location>your path</location>

like this

        <map:transformer name="i18n" logger="sitemap.transformer.i18n" 
src="org.apache.cocoon.transformation.I18nTransformer">
            <catalogues default="messages">
                <catalogue id="messages" name="messages" 
location="messages"/>
                <catalogue id="forms" name="FormsMessages" 
location="messages"/>
                <location>translations</location>
            </catalogues>
            <cache-at-startup>true</cache-at-startup>
        </map:transformer>


regards,

Marc

Bernard Sirius a écrit :

>using cocoon 2.1.5, java 5, tomcat 5 on windows xp pro
>
>my problem:
>Unable to locate resource: core (key [core])
>
>however, the problem arises only when locale=fr. I've
>tried that with the input-module method and the
>locale-action method to determining the locale in the
>sitemap. Modifying the english dictionary reflects in
>the generated XML, but the french dictionary keeps
>generating the error.
>
>The english dictionary is located at
>dictionaries/core_en.xml
>and the french dictionary at dictionaries/core_fr.xml
>I've even tried to create a french dictionary at
>dictionaries/core.xml but it's not found either
>
>the french dictionary:
><catalogue xml:lang="fr">
>  <message key="name">Nom</message>
>  ...
></catalogue>
>
>I've tried xml:lang="fre" without success.
>
>sitemap config:
>
>    <map:transformers>
>      <map:transformer name="i18n"
>          
>src="org.apache.cocoon.transformation.I18nTransformer">
>        <catalogues default="core">
>          <catalogue id="core" name="core"
>location="dictionaries"/>
>        </catalogues>
>       
><untranslated-text>untranslated</untranslated-text>
>        <cache-at-startup>true</cache-at-startup>
>      </map:transformer>
>    </map:transformers>
>    <map:actions>
>      <map:action name="locale"
>src="org.apache.cocoon.acting.LocaleAction">
>        <locale-attribute>locale</locale-attribute>
>        <use-locale>true</use-locale>
>        <default-locale language="en" country="US"/>
>        <store-in-request>false</store-in-request>
>        <create-session>false</create-session>
>        <store-in-session>true</store-in-session>
>        <store-in-cookie>false</store-in-cookie>
>      </map:action>
>    </map:actions>
>
>
>sitemap matcher:
>
>      <map:act type="locale">
>        <map:match pattern="**/*.jx">
>            <map:generate src="data/{1}/{2}.jx"
>type="jx"/>
>             <map:transform type="i18n">
>               <map:parameter name="locale"
>value="{../locale}"/>
>             </map:transform>
>            <map:serialize type="xml"/>
>        </map:match>
>      </map:act>
>
>I'm confused... any idea?
>
>bernard
>
>
>		
>__________________________________ 
>Do you Yahoo!? 
>Meet the all-new My Yahoo! - Try it today! 
>http://my.yahoo.com 
> 
>
>
>---------------------------------------------------------------------
>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