forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <>
Subject Re: I18n support (Re: German documentation for Apache Forrest)
Date Fri, 03 Dec 2004 10:01:10 GMT
El vie, 03-12-2004 a las 10:09, Upayavira escribió:
> Thorsten Scherler wrote:
> >>>Except that forrest can't handle i18n'd content yet :-/
> >>>      
> >>>
> >>Oh yeah, good point.
> >>
> >>Errrr.. translations *and* patches to handle i18n'd content would be 
> >>even more welcome ;-)
> >>    
> >>
> >Cheche did some work on that or not?
> >  
> >
> As have I (on Cocoon)


Nice to have you, Upayavira, as well here around. ;-)

> >I would like to use as well i18n in the fbits that would further fuel
> >the SOC.
> >
> >In lenya we have full support for i18n I will have a look how we are
> >doing it and will report back.
> >  
> >
> I'd be curious to hear how Lenya has done it (esp when it relates to 
> document oriented i18n).

You will find in the dis i18n.xmap:
 <map:pipeline type="noncaching">
      <map:match pattern="i18n-catalogue/**">
        <map:select type="resource-exists">
            <map:generate type="serverpages"
              <map:parameter name="pub-catalogue-location"
        	  <map:parameter name="catalogue-file" value="{1}"/>
            <map:transform type="xinclude"/>
          <map:when test="resources/i18n/{1}">
            <map:generate src="resources/i18n/{1}"/>

Then every document have e.g. index_en(de,es,..).xml

You have to define it in the sitetree.xml like:
 <node id="index">
    <label xml:lang="en">Home</label>
    <label xml:lang="de">Start</label>
    <label xml:lang="es">Inicio</label>

To render the final site in i18n you have to use (in sitemap.xmap):
    <map:resource name="style-cms-page">
      <map:transform type="i18n">      
        <map:parameter name="locale" value="{request:locale}"/>
      <map:transform src="../../xslt/util/page2xhtml.xsl">
        <map:parameter name="contextprefix"
      <map:transform src="../../xslt/util/strip_namespaces.xsl"/>
      <map:select type="parameter">
        <map:parameter name="statusCode" value="{statusCode}"/>
        <map:when test="">
          <map:serialize status-code="{statusCode}"/>

> At some point over the coming months (Jan/Feb) I intend to complete a 
> fully i18n Cocoon based site (that I should have finished something like 
> a year ago), and will probably be extending the CLI to help.

Cocoon uses as well Forrest, right. If you doing this, please, do it
over here and we all can help you. Then we will apply it for forrest
trunk. This way all other projects can benefit from your work. :)

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)

View raw message