Forrest i18n effort
Forrest i18n subproject
We need to get Forrest i18n to work to present users and the general audience with a decent and working language menu that reflects the list of available languages.
Tasks:
- Define the wanted behaviour
- Collect the pieces available presently in Forrest, and test the present implementation
- Identify the problems with the existing version
- Make our own changes to get Forrest to behave like we want it to
- Present the solution to the Forrest list (dev), and hopefully
get it accepted.
NoteAll of us should start subscribing to the Forrest dev list!
- Install a new version of the Forrest-doc on divvun.no.
The wanted behaviour
Have a look at risten.no. The available languages are listed to the top right, and one can change the interface language by clicking the links (which is just the server address augmented with ?locale=xx, see next section).
For a document centric site, we would like to have the language menu generated dynamically, and reflect the available language versions for the document in question. For pages available in only one language, the lang menu should reflect this by displaying the language of the document.
In cases where the browser requests an unavailable locale or no locale, Forrest should return the default locale as specified in either forrest.properties or skinconf.xml. That is, a request for index.html should be turned into a request for index_se.xml if default-lang=se.
The language (override) menu should be configurable from skinconf.xml, with the default rendering being a horizontal list along the top of the page. Both appearance (list, menu) and location (top, tabs, other location?) should be configurable independently.
The menu texts and all tabs and other text elements outside the content proper should be translated into the specified locale using standard Cocoon/Forrest translation dictionaries. If a locale is available for the document itself, but not all text elements to be translated, the fallback (and eventually the default) language should be used.
Current situation (Forrest svn version as of May 25, 2005)
A very recent blog describes the steps to turn on and utilise i18n. Unfortunately, it doesn't completely match what we have found - read on (what is good is that Forrest now degrades gracefully, without a 404 error).
Forrest uses its internationalisation features when they are enabled in forrest.properties: project.i18n=true
It is able to specify the wanted locale using http://localhost:8888/index.html?locale=se, or by letting the browser decide the locale. Forrest then chooses index_se.xml, and falls back to the default language when the locale isn't found.
If the tabs_se.xml and site_se.xml files exist in translation directory, the menus and tabs are translated as well, but only if the requested locale is specified by the browser.
What is still missing from the present Forrest version is a language override menu. Also, the menus and tabs aren't translated if a locale is specified within a URL (as index.html?locale=sme).
Problem summary:
- Forrest menu translation works only if locale is coming from browser - the same might be the case with the tabs, but that is not yet tested
- Document locale is disregarded if locale is taken from browser
- There's no documented way of specifying the default language, or generating the language override menu from the content of whatever.xml (without any locale in the filename) to make the default language listed among all languages
- No language override menu is generated
- Since no language override menu is generated, our requests for override menu configuration can not be evaluated further
Last modified: $Date: 2011-07-04 12:28:49 +0200 (man, 04 jul 2011) $, by $Author: trond $
by Sjur N. Moshagen, Tomi Pieski, Børre Gaup

