cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 許議中 <john...@erp.tw>
Subject Re: i18n and database -- solve
Date Tue, 16 Jan 2007 06:44:06 GMT
Solve it!

just change it
<location>i18n</location>
to
<location>cocoon:/i18n</location>

許議中 提到:
> Hi!
> 
> I'm try to put the i18n xml file to DB.
> 
> Here is the i18n setting in sitemap.xmap
> 
> 	<map:components>
> 		<!--**********************************************i18n*****************************************************-->
> 		<map:transformers default="xalan">
> 			<map:transformer name="i18n" src="org.apache.cocoon.transformation.I18nTransformer">
> 				<catalogues default="messages">
> 					<catalogue id="messages" name="messages">
> 						<location>i18n</location>
> 					</catalogue>
> 				</catalogues>				
> 				<cache-at-startup>no</cache-at-startup>
> 			</map:transformer>
> 		</map:transformers>
> 	</map:components>
> 
> 			<map:match pattern="i18n/messages_ja.xml">
> 				<map:generate src="i18n.xsp" type="serverpages"/>
> 				<map:transform src="sql2xml.xsl">
>           <map:parameter name="l" value="ja"/>
> 				</map:transform>
> 				<map:serialize type="xml"/>
> 			</map:match>
> 
> when I read the messages_ja.xml it's ok,
> 
> but when I use this to be the resource
> 
>       <map:match pattern="internal/protected">
> 				<map:generate src="content.xsp" type="serverpages">
>           <map:parameter name="p" value="{request-param:p}"/>
>           <map:parameter name="l" value="{request-param:l}"/>
> 				</map:generate>
> 				<map:act type="locale">
> 					<map:transform type="i18n">						
> 						<map:parameter name="locale" value="{request-param:l}"/>
> 					</map:transform>
> 				</map:act>
>         <map:transform type="session"/>
>         <map:transform src="stylesheets/page2chtml.xsl"/>
>         <map:transform type="encodeURL"/>
>         <map:serialize/>
>       </map:match>
> 
> the system say i18n/messages_ja.xml not loaded: Source URI not found
> 
> Because I need to change the i18n frequently, How to use it.
> 
> Best Regards
> 
> johnson
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message