You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Simply include a parameter in the request, either from a link or a form, that sets the requst_locale parameter to the language and (optionally) counry code to use.

<h3>Language Options</h3>
<ul>
    <li><a href="<s:url action="Welcome?request_locale=en"/>">English</a></li>
    <li><a href="<s:url action="Welcome?request_locale=ja"/>">Japanese</a></li>
    <li><a href="<s:url action="Welcome?request_locale=ru"/>">Russian</a></li>
</ul>

The default interceptor stack includes an i18n interceptor that watches for the request_locale parameter. The parameter name is configurable.

  • No labels