The targetLanguage element is a child of the parserOptions element. It has no child elements.

Oracle ATG Web Commerce Search supports multiple languages within the same index, to support separate language-specific searches on different document collections. However, Search also supports cross-language searches, which involve searching in one language and retrieving results in one or more different languages.

A use case for this functionality is shopping sites, where customers might not speak or write the site language but can read prices and sizes. In this scenario, users could query in Spanish and get English results and still achieve satisfactory results. In order to perform cross-language searches, both query and target languages must be loaded into the index, as well as special cross-language bridge data (see the ATG Search Administration Guide). At query time, the target language is specified with the following option:

<targetLanguage>lang</targetLanguage>

The lang value is the name of any valid language, or one of two special values:

  • All means that all languages with indexed content are target languages.

  • Same means that the same language as the query is the target, and is the default. Multiple instances of this option are allowed, which will establish target languages.