I have a webapp that uses Struts 2. I use the i18n interceptor with all the default settings. I thought this interceptor worked as follow:
You shouldn't use a session key defined by the interceptor for internal usage to get an action locale.
If a request_locale
parameter is detected by the i18n
interceptor the requested locale is created and put to the action context and also to the session under the key specified by the interceptor.
If the next request to the interceptor doesn't include request_locale
parameter then it gets a locale saved in the session, if not found the request locale is used.
Again the interceptor put returned locale to the action context. So, to get a locale used by the struts tags you should use
Locale locale = ActionContext.getContext().getLocale();