The MDEX Engine uses language IDs to determine the language analysis to use for processing a particular record. You assign language IDs at the following different levels:
Per MDEX Engine, globally, to specify a default language for any records, properties, or dimension tags that have not been assigned a language. If no global default language is specified, English is assumed to be the global default.
Per record. This is appropriate when different records contain different languages.
Per query, which should be used in your front-end application if different queries use different languages.
The language ID value that you assign to a record, property, or
dimension must be a valid RFC-3066 or ISO-639 code, such as
en
(English),
de
(German),
ja
(Japanese), or
zh-TW
(traditional Chinese).
See MDEX Engine Supported Languages for a full list of languages supported by the MDEX Engine and the language codes for each.
You can specify a global language ID in three different ways:
Use the
--lang
<lang_code> option on the Dgidx and Dgraph commands, where <lang_code> is the ISO-639 code for the language in the records; for example:dgidx --lang en dgraph --lang en
In Assembler-powered applications, the language ID can be set for the
defaultFilterState
as<property name="languageId" value="en" />
Use
&Ntl= parameter
to parse the language code from the URL.
If you do not specify a global language ID, the
MDEX Engine assumes by default that the language ID
is
en
(English).
Assign a language ID to each record if each record contains only one language, but different records contain different languages.
To specify a language ID for a record, add a
property named
Endeca.Document.language
to the record and set the value
to an ISO-639 language ID code; for example:
ja
, which indicates that the language of the record is
Japanese.