Stripes uses a LocalePicker to determine the locale to use for a request. The
LocalePicker is executed from the Stripes Filter, so it will execute even for direct-to-JSP navigation (read: you don't have to go through an ActionBean to take advantage of it). Once the
LocalePicker has determined the locale to use, Stripes uses a
HttpServletRequestWrapper to makes make calls to
request.getLocales() to return only the chosen locale. This means that not only will Stripes will use the correct locale without having to re-determine it, but that any other localization tool that relies on
request.getLocale[s]() should also default to the correct locale. This includes the JSTL
fmt:* tags - cool huh?
There's actually not a huge deal to be said about localized validation. The built in number and date type converters use the localization capabilities of the
java.text package to perform localized type conversion. So, if a user is being served pages localized into frenchFrench, it is expected that the user is inputting numbers and dates appropriate to the French locale.
If you don't define field names, Stripes will attempt to provide something vaguely user-friedly friendly by decomposing the form field name. But this will never be localized. The better alternative is to provide localized values for your field names. This is done in the field name bundle (by default StripesResources). The syntax is:
If you are using the Layout features of stripes you may want to pass localized values to the layout. See the section Passing additional information to the layout for more information about how to pass arbitrary formated formatted (including localized) content to a layout.