This interceptor extends the original xwork i18n interceptor
and adds functionality to support cookies.
- parameterName (optional) - the name of the HTTP request parameter that dictates the locale to switch to and save
in the session. By default this is request_locale
- requestCookieParameterName (optional) - the name of the HTTP request parameter that dictates the locale to switch to
and save in a cookien. By default this is request_cookie_locale
- requestOnlyParameterName (optional) - the name of the HTTP request parameter that dictates the locale to switch to
for the current request only, without saving it in the session. By default this is request_only_locale
- attributeName (optional) - the name of the session key to store the selected locale. By default this is
WW_TRANS_I18N_LOCALE
<interceptor name="i18nCookie" class="org.apache.struts2.interceptor.I18nInterceptor"/>
<action name="someAction" class="com.examples.SomeAction">
<interceptor-ref name="i18nCookie"/>
<interceptor-ref name="basicStack"/>
<result name="success">good_result.ftl</result>
</action>