Java Reference
In-Depth Information
Figure 11.4: The Login page with a link to switch languages
Since this link is displayed in every page of the application, it just
resubmits the previous request with the locale= parameter tacked on
at the end. By adding a getLastUrl ( ) to BaseActionBean , we can obtain the
URL with ${actionBean.lastUrl} . Indeed, different action beans are used
in different pages, but they all extend BaseActionBean , making it the
appropriate place to add the helper method.
All that's left is to add the entries in the resource bundles. We just have
to be careful not to get mixed up: the values in the English resource
bundle refer to French, and vice versa:
Download email_20/res/StripesResources.properties
layout.otherLanguage=Version fran\u00e7aise
layout.otherLocale=fr
Download email_20/res/StripesResources_fr.properties
layout.otherLanguage=English version
layout.otherLocale=en
 
 
Search WWH ::




Custom Search