cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berin Loritsch" <blorit...@infoplanning.com>
Subject Re: [C2]I18n transformer
Date Fri, 03 Nov 2000 13:36:14 GMT
----- Original Message ----- 
From: "Lassi Immonen" <limmonen@malla.urova.fi>
To: "Conny Krappatsch" <conny@smb-tec.com>; <cocoon-dev@xml.apache.org>
Sent: Friday, November 03, 2000 4:31 AM
Subject: [C2]I18n transformer


> Hi,
> 
> In attachment is C2 I18nTtransformer, which is port from Infozones
> I18NProcessor.
> 
> I don't have any license in there cause don't know which license to put
> there?? 
> 
> Usage:
> ---------
> Sitemap:
> <map:match pattern="">
>   <map:generate src="orig.xml"/>
>     <map:transform type="translate">
>       <parameter name="default_lang" value="en"/>
>       <parameter name="src" value="orig_trans.xml"/>    
>     </map:transform>
>     <map:transform src="simple2html.xsl"/>
>     <map:serialize type="html"/>
> </map:match>
> ---------
> orig.xml:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <lang_test 
> xmlns:i="http://apache.org/cocoon/i18n">
> <title><i:tr>Title</i:tr></title>
> <para i:tr="y">Paragraph</para>
> <para>Paragraph not to be translated</para>
> </lang_test>
> -----------
> orig_trans.xml:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <translations>
>   <entry>
>     <key>Title</key>
>       <translation lang="fi">Otsikko</translation>
>       <translation lang="sv">Titel</translation>
>   </entry>
>   <entry>
>     <key>Paragraf</key>
>       <translation lang="fi">Paragraafi</translation>
>       <translation lang="sv">Paragraf</translation>
>   </entry>
> </translations>
> --------
> 
> So I modified syntax a bit from I18NProcessor. Now you have to put all
> translations in one translation file, which is in my opinion better at
> least small sites as we are doing.
> 
> I didn't include parameter substitutions from I18NProcessor, but it
> wouldn't be big thing to add. I don't have such a need now. 

How different is it from the one in Avalon?  If it is the same, C2 already
has it included.  If it is different, can you send me the diff and a quick
summary of what you did?  The one in Avalon is the same as the one from
infozone approx. 4 weeks ago.


Mime
View raw message