When a merchandiser defines a search configuration in Merchandising, he or she selects a language from a preconfigured list. Though the term “language” is used throughout Merchandising, the values selected actually represent Java locales. So, for example, the list of available languages might include both British English (representing the locale en_GB) and US English (representing the locale en_US).

Each Commerce site implements its own mechanism for finding a user’s locale. One site might select a locale from the HTTP header of the request. Another site might supply a Profile page in which the user specifies a locale that ATG saves as a user profile property. A third site might provide a Language Preference drop-down list on a home page, and when a user makes a selection, it’s appended to the request as a query parameter that is processed by a custom pipeline servlet. Most multi-language sites will be designed to incorporate a combination of these options, giving a priority to each.

When you organize configurations by language, a search configuration folder uses language as its dimension type. Folders and search configurations it contains must specify a particular language so that the search configuration applied depends on the language specified by a visitor’s locale.

Note: In order to have different search configurations apply to different languages, you must first create a search configuration folder and then create configurations in it. Otherwise, configurations will get applied to all users, and the language only decides what language processing to apply to all users.

If a search configuration inherits settings from a base configuration, the assets do not have to use the same language as the base configuration, but they must not have conflicting languages. There may be a one-to-one relationship between the languages supported in each, but that’s not frequently true. It is best to use general languages, or the Any (not language specific) option, on your base search configurations.

For example, suppose the tree begins with a Language search configuration folder that contains many search configurations, among them one for French speaking Canadians and another for French speaking Belgians. A base search configuration with a French language (fr) can be used by both search configurations (fr_CA, fr_BE).

To define the languages, you update component properties either by accessing the component in the ATG Control Center or by creating a new properties file for the component in your local configuration directory: