[prev in list] [next in list] [prev in thread] [next in thread]
List: forrest-dev
Subject: Re: i18n in Forrest
From: "Konstantin Piroumian" <kpiroumian () apache ! org>
Date: 2003-10-29 13:19:58
[Download RAW message or body]
Took a look at the patch and have got a couple of ideas how to simplify the
sitemap.
1. It seems to me that maybe it'd be better to use some sort of a special
protocol to find the appropriate source file instead of using a selector,
e.g.:
<map:generate src="i18n:cocoon:/{../1}{../2}{lang}.xml"/>
2. The second option is to extend the file generator with i18n capabilities
and use it simply as:
<map:generate type="i18n-file" src="cocoon:/{../1}{../2}.xml">
<map:param name="locale" value="{locale}"/>
</map:generate>
the generator itself will try to find the source in this order:
- cocoon:/{../1}{../2}_{lang}_{country}_{variant}.xml
- cocoon:/{../1}{../2}_{lang}_{country}.xml
- cocoon:/{../1}{../2}_{lang}.xml
- cocoon:/{../1}{../2}.xml
Though, I'm not sure that implying that the file name consists of the main
part and an extension would fit all the needs.
Regards,
Konstantin
From: "Juan Jose Pablos" <cheche@che-che.com>
> Sten Aksel Heien wrote:
> >
> > Is the multi-locale generation only for the menu?
> yes, but I am planning to do it for all
>
> > How can we configure i18n in Forrest for both content and menu?
> >
>
> Applying the patch I forward to you ( it is not standard)
>
> > Would it be possible to have some part of the site in only one language,
and
> > other parts in multiple?
>
> See http://issues.cocoondev.org/jira/secure/ViewIssue.jspa?key=FOR-18
>
> > Would it be possible to switch language by clicking on flag-icons?
> >
> I would not use flag-icons as represent countries not languages.
>
> > What is "best-practice" for i18n in these topics?
>
> "not to ask so many questions and forward some code to us" :-) There is
> a mail I sent about 18n & Forrest.
>
> > Do we have a wiki to discuss these things for Forrest?
>
> No yet, Create one, and I will put some info on it.
>
> Cheers,
> Cheche
>
----------------------------------------------------------------------------
----
> Index: src/resources/conf/sitemap.xmap
> ===================================================================
> RCS file: /home/cvs/xml-forrest/src/resources/conf/sitemap.xmap,v
> retrieving revision 1.122
> diff -u -r1.122 sitemap.xmap
> --- src/resources/conf/sitemap.xmap 22 Sep 2003 13:07:48 -0000 1.122
> +++ src/resources/conf/sitemap.xmap 30 Sep 2003 16:23:47 -0000
> @@ -109,6 +109,9 @@
> <map:pipe name="profile-noncaching"
src="org.apache.cocoon.components.profiler.ProfilingNonCachingProcessingPipe
line"/>
> -->
> </map:pipes>
> + <map:actions>
> + <map:action name="locale"
src="org.apache.cocoon.acting.LocaleAction" />
> + </map:actions>
> </map:components>
>
> <!-- NOTE: the 'links view' is no longer used to discover a page's
links.
> @@ -245,7 +248,16 @@
> <!-- Default matches -->
> <!-- (HTML rendered from doc-v11 intermediate format -->
> <map:match pattern="**body-*.html">
> - <map:generate src="cocoon:/{1}{2}.xml"/>
> + <map:act type="locale">
> + <map:select type="exists">
> + <map:when test="content/xdocs/{../1}{../2}{lang}.xml">
> + <map:generate src="cocoon:/{../1}{../2}{lang}.xml"/>
> + </map:when>
> + <map:otherwise>
> + <map:generate src="cocoon:/{../1}{../2}.xml"/>
> + </map:otherwise>
> + </map:select>
> + </map:act>
> <map:transform type="idgen"/>
> <map:transform type="xinclude"/>
> <map:transform type="linkrewriter"
src="cocoon:/{1}linkmap-{2}.html"/>
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic