Hi Pierre,

It so happens that we discussed this on IRC 2 days ago:
http://servlet.uwyn.com/drone/log/bevinbot/rife/20051128 (check around 17:05)

Even if i18n is mainly an element's responsability, i like the idea to be able to get some very specific resource at template level with sth like "[!V 'L10N:bundlename:key"

Could be handy indeed, can you file an issue in Jira for that?

My proposal went into a similar direction, except instead of having a 'detect_client_locale' property, I was thinking of having a 'localeProvider' property. This would be an instance of a class that implements the LocaleProvider interface and have one method: List<Locale> getLocale(ElementSupport activeElement). RIFE could then include a ClientLocaleProvider class that obtains the list of locales that the browser provides as a suggestion. It also opens up the possibility of any kind of possible locale negotiation.

A LocaleProvider interface is a good idea.

What about the possibility to use a scope argument:
- request i.e. the client locales as above
- application, see L10N_DEFAULT_LANGUAGE ("en" by default) and L10N_DEFAULT_COUNTRY (null by default) - template, sth only known at the template level (the "page" scope of fmt tags in JSP), with a default value which can be set by configuration
- session, a value explicitely given by the user

with:
- by default, the scope would be "request", but this default behavior can be change (e.g. to "session" if session locales are used) either:
  * by a function LocaleProvider.setDefaultScope
  * or by a configuration parameter
- when available, application and template locales would be ever supplied
- with session scope, request locales would be supplied if available
- order of priority: application<template<request<session

I don't that separate scoping is needed, IoC should provide all the scoping you need since you can inject properties in the reposition, site-structure and elements. Btw, RIFE doesn't support the notion of traditional sessions (http://rifers.org/wiki/display/RIFE/Acceptable +session+support).

Best regards,

Geert

--
Geert Bevin                       Uwyn bvba
"Use what you need"               Avenue de Scailmont 34
http://www.uwyn.com               7170 Manage, Belgium
gbevin[remove] at uwyn dot com    Tel +32 64 84 80 03

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net


_______________________________________________
Rife-users mailing list
[email protected]
http://www.uwyn.com/mailman/listinfo/rife-users

Reply via email to