You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Dave Brondsema <da...@brondsema.net> on 2003/11/15 18:37:30 UTC

whole site i18n

I'm working on a site for which I want all (or mostly all) pages to be available
in multiple languages.  As far as I understand, this would be best done with
seperate sites, rather than using the i18n capabilities of forrest.  Is this
right?  And if so, it would probably be possible to set up a forrest.properties
for each locale that pointed to the same configuration files and "raw content"
directory but different 'xdocs' directories that correspond to each locale.  Right?

-- 
Dave Brondsema 
dave@brondsema.net 
http://www.brondsema.net - personal 
http://www.splike.com - programming 
http://csx.calvin.edu - student org 

Re: whole site i18n

Posted by Upayavira <uv...@upaya.co.uk>.
Juan Jose Pablos wrote:

> Upa,
>
>>
>> I did discuss with Cheche about making the CLI able to render 
>> multiple versions of a page, one for each of a set of locales. It 
>> shouldn't be too hard to do.
>
>
> We end up trying to simulate what the client was doing if this was a 
> http client, so I took the impression that we need to implement with a 
> browser and then with the CLI.
>
> Are we still thinking that right?

Not sure if I understand.

Basically, when working online, the User agent (browser) interacts with 
Cocoon, giving it the current locale, etc.

With the CLI, the CLI is effectively the user agent, and needs to 
simulate the activities of the browser.

So, if a browser can pass a locale to Cocoon, then the CLI needs to be 
able to also.

At present, the CLI passes a default, unconfigurable locale to Cocoon.

Now, things are different with the CLI from an online scenario. Online, 
we can hand exactly the page the user has requested, translated 
correctly for their locale. With the CLI, we need to pregenerate all 
locales for a page. So if we have 10 possible locales, we need to 
regenerate that page 10 times.

This is not implemented in the CLI, but could be.

If any of you want to have a go, I'll happily give you pointers.

Regards, Upayavira


Re: whole site i18n

Posted by Juan Jose Pablos <ch...@che-che.com>.
Upa,

> 
> I did discuss with Cheche about making the CLI able to render multiple 
> versions of a page, one for each of a set of locales. It shouldn't be 
> too hard to do.

We end up trying to simulate what the client was doing if this was a 
http client, so I took the impression that we need to implement with a 
browser and then with the CLI.

Are we still thinking that right?


Cheers,
cheche



Re: whole site i18n

Posted by Upayavira <uv...@upaya.co.uk>.
Dave Brondsema wrote:

>I'm working on a site for which I want all (or mostly all) pages to be available
>in multiple languages.  As far as I understand, this would be best done with
>seperate sites, rather than using the i18n capabilities of forrest.  Is this
>right?  And if so, it would probably be possible to set up a forrest.properties
>for each locale that pointed to the same configuration files and "raw content"
>directory but different 'xdocs' directories that correspond to each locale.  Right?
>
>  
>
I have considered doing something similar, where I put the content into 
content/en or content/fr, etc, and then use the locale to identify which 
content is passed back to the user, something like:

<map:generate src="content/{locale}/{1}.xml"/>

This wasn't in Forrest, but should be just as doable there.

I did discuss with Cheche about making the CLI able to render multiple 
versions of a page, one for each of a set of locales. It shouldn't be 
too hard to do.

Regards, Upayavira