This section describes the use of the RequestLocale
and OrginatingRequest.requestLocale
components that is specific to the Personalization module. It contains the following topics:
Personalization RequestLocale Hierarchy
The Personalization module request locale hierarchy is set by default to the following. Note that this hierarchy differs from the Dynamo request locale hierarchy in that the Personalization module hierarchy includes the profile attribute.
Profile
locale
property -- Thelocale
value in the profile can be set, for example, by having the user choose a locale from a list of choices on a Preferences page that is provided at the Web site.The
ACCEPT-LANGUAGE HTTP
header -- this is set in the/atg/dynamo/servlet/RequestLocale.validLocales
component.Default request locale -- this is defined in the
/atg/dynamo/servlet/RequestLocale.defaultRequestLocaleName
component.The default locale specified in the server’s JVM.
See also Allowing Users to Choose a Locale. For more information on setting up a site with language options, see the Quincy Funds Demo and the ATG Quincy Funds Demo Documentation.
Personalization RequestLocale Properties
The Personalization module sub-classes the Dynamo RequestLocale
object to obtain a locale from the visitor’s profile. The Personalization module adds the following properties to the RequestLocale
component.
profilePath
-- The Nucleus path to the Profile object in each session. This is required so that theRequestLocale
component can access the visitor’s profile.profileAttributeName
-- This attribute specifies the locale choice of the visitor. It is best to let this value default to null in the profile template. If this value defaults to null and the user has not made a language choice, no locale will be assigned from the profile. The other locale determinants (such as the request’sACCEPT-LANGUAGE HTTP
header) will be used for the session until the user makes a language choice and thereby sets the profile attribute value.