Matthias Stoll ha scritto:
Hi there.
I have a Tiles / Struts application. When using i18n in Struts (property
files) everything works fine, even if the user has selected a language in
his browser (e.g. en as preferred language, struts loads the property_en
file). Tiles is not doing so. It loads the default definition file
(without _en or _de) at initialization. Struts controller Locale is set to
true. Tiles only changes locale when manually setting
request.getSession().setAttribute (Globals.LOCALE_KEY, Locale.ENGLISH).
Does anyone have an idea, what the problem is?
Uh you're right! I18NFactorySet takes the locale only from the session!
Anyway you can:
* use Tiles 2 (that is currently in the sandbox
http://struts.apache.org/struts-sandbox/tiles/index.html ) that does not
suffer from this problem
* or create your own FactorySet, extending I18NFactorySet and overriding
the getDefinitionsFactoryKey, taking the locale from the request.
Obviously you have to register it in the Tiles plugin configuration.
HTH
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]