List Info

Thread: Re: how does lenya handle the locale setting?




Re: how does lenya handle the locale setting?
user name
2007-01-23 10:20:00
Jörn Nettingsmeier schrieb: > hi *! > > > i've been fiddling with a language selector, and i realized that we > currently have three totally orthogonal ways of handling language: > > 1. requesting a translation of a document by calling foo_.html or > lenya-document:,lang=. > 2. the locale setting in the request object. > 3. the ?locale= request parameter. > > the first obviously governs in which way the content is presented, but > the second is relevant to the I18nTransformer. the third does not seem > to be used with lenya. > > 2 questions: > > how do i set the locale? i know there is an action, but a page in the > cocoon wiki says that "actions are going out of fashion", whatever that > means. What do you mean with "set the locale"? AFAIK the locale is set by the user agent. You can access it using {request:locale}. > should (1) and (2) always be in sync? for live, i'd say yes. for > authoring, syncing would mean that someone who works with foreign > language content also gets translated lenya menus. slightly odd, but for > simplicity i'd say we should gang the two. IMO we shouldn't sync them. Changing the i18n of the GUI when changing the page language would IMO lead to an inconsistent look&feel. Usually you have two i18n transformer configurations in your project, one for the Lenya GUI and the other for the i18n of page contents (i.e., to add internationalized text snippets to the page, like "Read more" / "Lesen Sie mehr" below a teaser). The latter uses the locale of the requested page. -- Andreas --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribelenya.apache.org For additional commands, e-mail: dev-helplenya.apache.org
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )