forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira>
Subject Re: i18n errors, bad downgrading
Date Thu, 11 Mar 2004 09:58:41 GMT
Sjur Nørstebø Moshagen wrote:

> That is, the basic documentation emphasises and points out the 
> advantages of using the dynamic aspect of Forrest for web development, 
> which is in clear contrast with what you write. I would very much like 
> Forrest to be the dynamic web development tool it is said to be, but 
> more importantly, the limitations of Forrest in various areas should 
> be clearly documentet. Especially the present limitations regarding 
> i18n should be noted - the known i18n issues isn't even listed on the 
> 'Open issues' page.
> I might be happy with the static solution for the final production 
> site, but for development purposes I need the dynamic version with 
> i18n support as outlined, and sooner rather than later;) I am happy to 
> help with whatever to make that come through. 

Well, you can start by explaining to me how I18N works ;-)

I have a site that is currently in English. I've got Polish content to 
add. It is built with Cocoon, but generated with the Cocoon Ant task 
(same stuff as CLI). I plan to extend the CLI to be able to generate 
multiple versions of the same page, by allowing something like:

   <uris name="docs" follow-links="true" locales="en,pl">
     <uri type="insert" src-prefix="docs/" src="index.html"
          dest="build/dest/*{locale}" />

What this says is, generate the site twice, each time starting crawling 
at index.html, first time with a locale set to en, second time with it 
set to pl.
When it has created a page, say buddhism.html, it would create the 
filename for this page from the specified destination of 
build/dest/*.{locale}. So, it would become build/dest/buddhism.html.en, 
or build/dest/ I believe this suits Apache's I18N 
functionality. Or, alternatively, I could do:

   <uris name="docs" follow-links="true" locales="en,pl">
     <uri type="append" src-prefix="docs/" src="index.html"
          dest="build/dest/{locale}/" />

In which case I'd get build/dest/en/buddhism.html and 
build/dest/pl/buddhism.html respectively.

Now, I don't know what really constitutes a 'locale', and what sorts of 
strings I might expect a locale to be. Some samples would really help me.

Forresters - I presume that if, when Cocoon is generating a page, the 
environment's locale is set correctly to whatever is provided to the 
CLI, in this case en or pl,. that this would work well with Forrest's 
I18N functionality. Or am I missing something.

Thanks for your time. It is about time I worked out what I18N is all about.

Regards, Upayavira

View raw message