You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Sten Aksel Heien <sa...@objectnet.no> on 2003/10/01 12:15:35 UTC

i18n in Forrest

Hi all

Here is a norwegian translation for the fresh-site menu.

I still have problem seeing the strategy for translating a whole site 
- have multiple languages for one site.

Pointers needed :-)

--
Sten Aksel Heien - sah@objectnet.no

Re: i18n in Forrest

Posted by Juan Jose Pablos <ch...@che-che.com>.
Jeff Turner wrote:
> Me too :)  Any volunteers for explaining how it works now, how it will
> work eventually, and how we get from here to there?
> 

out of bug #FOR-18 seems to me that we could aggree on this:

1) Eventually forrest provide translated content for the content that 
comes from forrest (copyright notice, some tags and stuff)

2) Menus,tabs could be provide by forrest but allow to overwrite by users

3) You have one XML source file per language



We will start by 1 and 2
A) Use catalogs for xsl:text output that belongs to forrest 
(menu,tabs,footer)

I am not sure if we will be using the lables of a keyword to find the 
translation e.g.

<my-page label"My label" />

if I use "My label" as the translation key, that key is case sensitive 
and "My label page" could have same meaning on that context.

If I use my-page as the translation key then I have not got access to 
the information displayed to the user that could be "Cool Label" and the 
translation could be wrong.


B) About XML source file per language.
I did a bit of reseach and out of apache docs, I think that 
myfile.xml.{locale} is more common than myfile.{locale}.xml

see here:
http://cvs.apache.org/viewcvs.cgi/httpd-docs-2.0/manual/mod/


C) As suggested on the bug use the locale and i18n that cocoon provides.


I hope is enough,

I need a bit of help, send any patch if you have it working.

Cheers,
Cheche


Re: i18n in Forrest

Posted by Jeff Turner <je...@apache.org>.
On Wed, Oct 01, 2003 at 12:15:35PM +0200, Sten Aksel Heien wrote:
> Hi all
> 
> Here is a norwegian translation for the fresh-site menu.
> 
> I still have problem seeing the strategy for translating a whole site 
> - have multiple languages for one site.

Me too :)  Any volunteers for explaining how it works now, how it will
work eventually, and how we get from here to there?

--Jeff

> 
> Pointers needed :-)

Re: i18n in Forrest

Posted by Juan Jose Pablos <ch...@che-che.com>.
Konstantin Piroumian wrote:
> you are describing me the behavior of LocaleAction, but what I was asking is
> why it doesn't work in Forrest?

I do not know because it does work for me.

I am using debian 3.0 mozilla 1.2 JDK 1.4



Re: i18n in Forrest

Posted by Konstantin Piroumian <kp...@apache.org>.
From: "Juan Jose Pablos" <ch...@che-che.com>
> Konstantin Piroumian wrote:
> >
> >
> > Won't adding a 'locale=ru' parameter switch the language? AFAIR, you are
> > using LocaleAction in menu.xmap, which looks for a parameter first and
then
> > everything else.
> >
>
> Yes it does, this is the order from o.a.c.acting.LocaleAction.java:
>
>
> Request CGI parameter "locale"
> Session attribute "locale"
> First matching Cookie parameter "locale"
> within each cookie sent with the current request
> Locale setting of the requesting object
>
> (in the case of language, if the above cases do not yield a valid value
> the locale value of the server is used)

Cheche,

you are describing me the behavior of LocaleAction, but what I was asking is
why it doesn't work in Forrest? Maybe I am doing something wrong. I'll try
to start from scratch and see if it will work this time and will let you
know about the results.
(BTW, just take a look at the authors of LocaleAction at
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/acting/LocaleAction.html
;-D ).

BTW, I am quite agree with your i18n plan in Forrest, so here is mine +1 for
it.

Regards,
  Konstantin

>
> Cheers,
> Cheche
>
>


Re: i18n in Forrest

Posted by Juan Jose Pablos <ch...@che-che.com>.
Konstantin Piroumian wrote:
> 
> 
> Won't adding a 'locale=ru' parameter switch the language? AFAIR, you are
> using LocaleAction in menu.xmap, which looks for a parameter first and then
> everything else.
> 

Yes it does, this is the order from o.a.c.acting.LocaleAction.java:


Request CGI parameter "locale"
Session attribute "locale"
First matching Cookie parameter "locale"
within each cookie sent with the current request
Locale setting of the requesting object

(in the case of language, if the above cases do not yield a valid value
the locale value of the server is used)

Cheers,
Cheche


Re: i18n in Forrest

Posted by Konstantin Piroumian <kp...@apache.org>.
From: "Juan Jose Pablos" <ch...@che-che.com>
> Konstantin Piroumian wrote:
> >
> > Though, I have no idea how to check this. Anybody knows how to switch
the
> > language on Forrest site?
> >
>
>
> on the bug there is a reference:
> http://issues.cocoondev.org/jira/secure/ViewIssue.jspa?key=FOR-18
>
>
> add project.i18n=true to forrest.properties
> run:
>
> forrest seed
> forrest run

Ok, I'll try.

>
>
> After that you need to change your language settings on your browser,
> for more info:
>
> http://www.debian.org/intro/cn

Won't adding a 'locale=ru' parameter switch the language? AFAIR, you are
using LocaleAction in menu.xmap, which looks for a parameter first and then
everything else.

Regards,
  Konstantin

>
> Cheers,
> Cheche
>
>


Re: i18n in Forrest

Posted by Juan Jose Pablos <ch...@che-che.com>.
Konstantin Piroumian wrote:
> 
> Though, I have no idea how to check this. Anybody knows how to switch the
> language on Forrest site?
> 


on the bug there is a reference:
http://issues.cocoondev.org/jira/secure/ViewIssue.jspa?key=FOR-18


add project.i18n=true to forrest.properties
run:

forrest seed
forrest run


After that you need to change your language settings on your browser, 
for more info:

http://www.debian.org/intro/cn

Cheers,
Cheche


Re: i18n in Forrest

Posted by Konstantin Piroumian <kp...@apache.org>.
Thanks for the translation.
Committed.

Though, I have no idea how to check this. Anybody knows how to switch the
language on Forrest site?

Regards,
  Konstantin

From: "Sten Aksel Heien" <sa...@objectnet.no>

> Hi again
>
> Sorry for sending "menu_no.xml" once more, but first one was sent before I
> had saved my last edit.
>
> - Sten Aksel
>
> > -----Original Message-----
> > From: Sten Aksel Heien [mailto:sah@objectnet.no]
> > Sent: 1. oktober 2003 12:16
> > To: forrest-dev@xml.apache.org
> > Subject: i18n in Forrest
> >
> >
> > Hi all
> >
> > Here is a norwegian translation for the fresh-site menu.
> >
> > I still have problem seeing the strategy for translating a whole site
> > - have multiple languages for one site.
> >
> > Pointers needed :-)
> >
> > --
> > Sten Aksel Heien - sah@objectnet.no
> >
>


RE: i18n in Forrest

Posted by Sten Aksel Heien <sa...@objectnet.no>.
Hi again

Sorry for sending "menu_no.xml" once more, but first one was sent before I
had saved my last edit.

- Sten Aksel

> -----Original Message-----
> From: Sten Aksel Heien [mailto:sah@objectnet.no]
> Sent: 1. oktober 2003 12:16
> To: forrest-dev@xml.apache.org
> Subject: i18n in Forrest
>
>
> Hi all
>
> Here is a norwegian translation for the fresh-site menu.
>
> I still have problem seeing the strategy for translating a whole site
> - have multiple languages for one site.
>
> Pointers needed :-)
>
> --
> Sten Aksel Heien - sah@objectnet.no
>