You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Cyriaque Dupoirieux <Cy...@pcotech.fr> on 2005/07/07 13:54:46 UTC

[i18n] again...

Hi,

    I'm really sorry to ask the question but I cannot retrieve the 
answer in the archive.
    How can I change the language of the static site using i18n ?
    I tried to set -Duser.language=fr in the ant call, and it's Ok for 
the folder structure : site/fr/...
    But my labels are still in English (ie: Search button is called 
"Search"...)


-- 

Cordialement,
Cyriaque,


Re: [i18n] again...

Posted by Juan Jose Pablos <ch...@apache.org>.
Cyriaque Dupoirieux wrote:
>    I'm really sorry to ask the question but I cannot retrieve the answer 
> in the archive.
>    How can I change the language of the static site using i18n ?
>    I tried to set -Duser.language=fr in the ant call, and it's Ok for 
> the folder structure : site/fr/...
>    But my labels are still in English (ie: Search button is called 
> "Search"...)
> 
> 

My problem is that i am not able to reproduce your problem in my laptop. 
    I will try to test it on another computer and i will report it back.

I am using:

cheche@yarel:/var/tmp/fs$ java -version
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)


Re: [i18n] again...

Posted by Børre Gaup <bo...@samediggi.no>.
Bearjadat, Suoidnemánnu 08. b.  2005 09:27, Johannes Schaefer čálii:
> Pedro I. Sanchez schrieb:
> > On Thu, 2005-07-07 at 13:54 +0200, Cyriaque Dupoirieux wrote:
> >>Hi,
> >>
> >>    I'm really sorry to ask the question but I cannot retrieve the
> >>answer in the archive.
> >>    How can I change the language of the static site using i18n ?
> >>    I tried to set -Duser.language=fr in the ant call, and it's Ok for
> >>the folder structure : site/fr/...
> >>    But my labels are still in English (ie: Search button is called
> >>"Search"...)
> >
> > In previous e-mails J.P. Pablos indicated that i18n worked for him but
> > it has never worked for me unless I do a couple of local changes (using
> > 0.7, not the SVN version).
> >
> > 1. Set project.i18n=true in forrest.properties (in you site).
> >
> > 2. This is the ugly part. In apache-forrest-0.7/main/webapp/sitemap.xmap
> > change the following:
> >
> >   <map:parameter name="locale" value="{request:locale}"/>
>
> have you ever experimented with a url like this
>  http://localhost:8888/..../index.html?locale=fr_FR
>
I tried this approach when I made the http://divvun.no site.

The result was that the main document was translated to the requested 
language, but the menu was displayed only in the language of requested by the 
browser.

When I translated the common messages, located in 
$FORREST_HOME/main/webapp/skins/common/translations/CommonMessages*.xml, they 
appeared as requested.

I ended up making subtabs for the different languages.

Børre

Re: [i18n] again...

Posted by "Pedro I. Sanchez" <ps...@colcan.biz>.
On Fri, 2005-08-07 at 09:27 +0200, Johannes Schaefer wrote:
> > 1. Set project.i18n=true in forrest.properties (in you site).
> > 
> > 2. This is the ugly part. In apache-forrest-0.7/main/webapp/sitemap.xmap
> > change the following:
> > 
> >   <map:parameter name="locale" value="{request:locale}"/>
> 
> have you ever experimented with a url like this
>  http://localhost:8888/..../index.html?locale=fr_FR
> 
> this is a guess of mine seeing the cocoon request:locale
> Johannes
> 
If your web site supports multiple languages then the above is probably
a solution. But if your web site is written only in one language, like
the vast majority are, you are not interested in that type of URL or in
telling your visitors how to set up the language preferences in their
browsers. In my case, I want Forrest to use the Spanish catalogues to
generate a static web site. So far my ugly hack above does the job.

But ideally I'd like to be able to type

$ LANG=fr_FR forrest

or

$ LANG=es_ES forrest

and get the static web site to use 1) the corresponding
language-specific content, and b) the corresponding i18n catalogues.
The former seems to work (see
http://casa.che-che.com/blog/2005/05/10/internalization-a-site-using-forrest-07-dev/
)
but the latter does not work (for me at least). Of course, if your web
site content is in one language only you then don't care about 1) at
all.

-- 
Pedro



Re: [i18n] again...

Posted by Johannes Schaefer <jo...@uidesign.de>.

Pedro I. Sanchez schrieb:
> On Thu, 2005-07-07 at 13:54 +0200, Cyriaque Dupoirieux wrote:
> 
>>Hi,
>>
>>    I'm really sorry to ask the question but I cannot retrieve the 
>>answer in the archive.
>>    How can I change the language of the static site using i18n ?
>>    I tried to set -Duser.language=fr in the ant call, and it's Ok for 
>>the folder structure : site/fr/...
>>    But my labels are still in English (ie: Search button is called 
>>"Search"...)
>>
>>
> 
> 
> In previous e-mails J.P. Pablos indicated that i18n worked for him but
> it has never worked for me unless I do a couple of local changes (using
> 0.7, not the SVN version).
> 
> 1. Set project.i18n=true in forrest.properties (in you site).
> 
> 2. This is the ugly part. In apache-forrest-0.7/main/webapp/sitemap.xmap
> change the following:
> 
>   <map:parameter name="locale" value="{request:locale}"/>

have you ever experimented with a url like this
 http://localhost:8888/..../index.html?locale=fr_FR

this is a guess of mine seeing the cocoon request:locale
Johannes


> 
> into
> 
>   <map:parameter name="locale" value="fr_FR"/>
> 
> 3. Run forrest to generate your French website.
> 
> You should get the French labels now. Setting the LANG environment
> variable or using the -Duser.language flag don't work for me.
> 
> Hope it helps,
> 


-- 
User Interface Design GmbH * Teinacher Str. 38 * D-71634 Ludwigsburg
Fon +49 (0)7141 377 000 * Fax  +49 (0)7141 377 00-99
Geschäftsstelle: User Interface Design GmbH * Lehrer-Götz-Weg 11 * D-81825 München
www.uidesign.de

Buch "User Interface Tuning" von Joachim Machate & Michael Burmester
www.user-interface-tuning.de

Re: [i18n] again...

Posted by Cyriaque Dupoirieux <Cy...@pcotech.fr>.
Pedro I. Sanchez a écrit :

>On Thu, 2005-07-07 at 13:54 +0200, Cyriaque Dupoirieux wrote:
>  
>
>>Hi,
>>
>>    I'm really sorry to ask the question but I cannot retrieve the 
>>answer in the archive.
>>    How can I change the language of the static site using i18n ?
>>    I tried to set -Duser.language=fr in the ant call, and it's Ok for 
>>the folder structure : site/fr/...
>>    But my labels are still in English (ie: Search button is called 
>>"Search"...)
>>
>>
>>    
>>
>
>In previous e-mails J.P. Pablos indicated that i18n worked for him but
>it has never worked for me unless I do a couple of local changes (using
>0.7, not the SVN version).
>
>1. Set project.i18n=true in forrest.properties (in you site).
>
>2. This is the ugly part. In apache-forrest-0.7/main/webapp/sitemap.xmap
>change the following:
>
>  <map:parameter name="locale" value="{request:locale}"/>
>
>into
>
>  <map:parameter name="locale" value="fr_FR"/>
>
>3. Run forrest to generate your French website.
>
>You should get the French labels now. Setting the LANG environment
>variable or using the -Duser.language flag don't work for me.
>
>Hope it helps,
>
>  
>
Thanks,

    I have already read you solution in the archive.
    I tried to change the environment variables but it doesn't work for 
me either.

Cyriaque,


Re: [i18n] again...

Posted by "Pedro I. Sanchez" <ps...@colcan.biz>.
On Thu, 2005-07-07 at 13:54 +0200, Cyriaque Dupoirieux wrote:
> Hi,
> 
>     I'm really sorry to ask the question but I cannot retrieve the 
> answer in the archive.
>     How can I change the language of the static site using i18n ?
>     I tried to set -Duser.language=fr in the ant call, and it's Ok for 
> the folder structure : site/fr/...
>     But my labels are still in English (ie: Search button is called 
> "Search"...)
> 
> 

In previous e-mails J.P. Pablos indicated that i18n worked for him but
it has never worked for me unless I do a couple of local changes (using
0.7, not the SVN version).

1. Set project.i18n=true in forrest.properties (in you site).

2. This is the ugly part. In apache-forrest-0.7/main/webapp/sitemap.xmap
change the following:

  <map:parameter name="locale" value="{request:locale}"/>

into

  <map:parameter name="locale" value="fr_FR"/>

3. Run forrest to generate your French website.

You should get the French labels now. Setting the LANG environment
variable or using the -Duser.language flag don't work for me.

Hope it helps,

-- 
Pedro