If you need to make gear content (text labels or user messages, for example) be both configurable and localizable, you can do this by observing the following guidelines:
Do not put any text that might appear on the screen (labels, user messages, etc.) into a gear instance parameter. Instead, put them in resource bundles.
Make the resource bundle name be a gear parameter. You can have a separate resource bundle for each gear instance if you want.
Be sure not to change the response locale, so that the locale and
charset
specified by thePageDispatcherServlet
are preserved.
Once you have set up your gears in this manner, you would then specify a particular resource bundle and locale in your gear page fragments. For example:
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> <fmt:bundle basename=my.portal.Resources/> <fmt:message id="finishButton" key="finishButton"/>