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 dimension or property. This is appropriate when records contain dimensions or properties in 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).
A full list of ISO-639 codes is available at:
http://www.loc.gov/standards/iso639-2/php/code_list.php
Specify a global
language ID using 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
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, create a
Java manipulator in your Developer Studio pipeline, and configure it to add a
property named
Endeca.Document.lang_code
to the record, where
<lang_code> is the ISO-639 language ID code for the language in
the records; for example:
Endeca.Document.ja
, which indicates that the language of
the record is Japanese.
For more information about how to create and use Java manipulators, refer to the Developer Studio Help.
Assign language
IDs to individual properties in
prefix.languages.xml
files, where
prefix
is the name of your application; for example,
smithHardware.languages.xml
.
For example, the following excerpt from a languages file assigns language IDs to properties named "Property 1", "Property 2", and "Property 3":
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE LANGUAGE SYSTEM "languages.dtd"> <LANGUAGES> <KEY LANGUAGE NAME="Property 1" LANGUAGE="en"/> <KEY LANGUAGE NAME="Property 2" LANGUAGE="es"/> <KEY LANGUAGE NAME="Property 3" LANGUAGE="ja"/> </LANGUAGES>
Note
You must also create language-specific user interfaces to display information in particular languages. For information about how to do this, refer to the Workbench User's Guide and the Assembler Application Developer's Guide.