forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sjur Moshagen <>
Subject Re: Using browser headers for i18n?
Date Mon, 22 May 2006 11:33:22 GMT
Den 22. mai. 2006 kl. 13.19 skrev Bertrand Delacretaz:

> Hi devs,
> I'm preparing a simple patch against the trunk, to make i18n more
> consistent, mostly by using a single definition of the LocaleAction
> and LocaleMatcher, in the main sitemap.

This is excellent work, and greatly appreciated!

> This allows the locale to be selected reliably by a request parameter
> (?locale=fr for example), whereas in the current trunk is a bit
> inconsistent with several LocaleAction definitions (all with default
> settings, no big deal) and also use of request:locale in some places
> vs. LocaleAction/locale in other places. This causes weird effects
> when trying to use a locale parameter, like content in one language
> and tabs or menu in another.

I have observed similar behaviour, but never took the time to  
investigate the cause of it.

> I haven't solved the configuration problem yet (how to make the
> parameters of these components configurable per project), so my
> question is about the default settings:
> Should the "use browser-supplied headers to select locale" option stay
> on as the default?
> It's a good option in an perfect world where everybody's browsers is
> configured properly, but in my experience it's rarely the case. And,
> as it's not explicit, it's often invisible to people starting with
> i18n, causing all sorts of frustation while testing. I think having to
> specify the locale explicitely means less surprises.
> So I'd prefer turning this option off be default. For now this means
> people would have to patch the main sitemap manually to re-enable it.
> But the previous default was to have this option on, so I don't want
> to change it if that was on purpose.

In my opinion it should be left as is (ie on), and a feature for  
explicitly overriding the browser setting, for example, by providing  
links to other language versions of the same document, should be  
added. This has been discussed before, and I think there are even a  
JIRA issue for it. The overriding feature could be a menu, or a list  
of other language versions, or something else.

I don't see what you gain by turning it off, as means for explicit  
locale overriding should in any case be provided (not that it is  
included with the present forrest seeds). That is: I would like to  
have *both* browser-supplied header as locale selection *and*  
explicit selection (where the explicit selection should override the  
browser-supplied one).

Just my 2 c.

a forrest user lurking on the dev list

View raw message