Sun Java(TM) System Directory Server 5 2004Q2 Administration Reference |
Chapter 5
Directory Internationalization ReferenceDirectory Server allows you to store, manage, and search for entries and their associated attributes in a number of different languages. An internationalized directory can be an invaluable corporate resource, providing employees and business partners with immediate access to the information they need in the languages they can understand.
The directory supports all international characters by default because directory data is stored in UTF-8. Further, Directory Server allows you to specify matching rules and collation orders based on language preferences in search operations.
This chapter contains the following sections:
About LocalesDirectory Server provides support for multiple languages through the use of locales. A locale identifies language-specific information about how users of a specific region, culture, and/or custom expect data to be presented, including how data of a given language is interpreted and how data is to be sorted, or collated.
In addition, the locale may indicate what code page an application should select for interaction with an end user concerning this data. A code page is an internal table that the operating system uses to relate keyboard keys to character font screen displays.
More specifically, a locale specifies:
The collation order provides language and cultural-specific information about how the characters of a given language are to be sorted. It identifies things like the sequence of the letters in the alphabet, how to compare letters with accents to letters without accents, and if there are any characters that can be ignored when comparing strings. The collation order also takes into account culture-specific information about a language, such as the direction in which the language is read (left to right, right to left, or up and down).
The time and date formats determine the customary appearance of times and dates in the region. The time format indicates whether the locale uses a 12- or 24-hour clock. The date format includes both the short date order, for example MM/dd/yy (month/day/year) or dd/MM/yy (day/month/year), and the long date format, including the names of months and days of the week in the given language. For example, the date “January 10, 2004” is represented as “10. leden 2004” in Czech and “10 janvier 2004” in French.
Identifying Supported LocalesWhen performing directory operations that require you to specify a locale, such as a search operation, you can use a language tag or a collation order object identifier (OID).
A language tag is a string that begins with the two-character lowercase language code that identifies the language (as defined in ISO standard 639). If necessary to distinguish regional differences in language, the language tag may also contain a country code, which is a two-character string (as defined in ISO standard 3166). The language code and country code are separated by a hyphen. For example, the language tag used to identify the American English locale is en-US.
An object identifier (OID) is a decimal number used to uniquely identify an object, such as an attribute or object class. The OIDs you use when searching or indexing an internationalized directory identify specific collation orders supported by Directory Server. For example, the OID 1.3.6.1.4.1.42.2.27.9.4.74.1 identifies the Finnish collation order.
When performing an international search in the directory, use either the language tag or the OID to identify the collation order you want to use. When setting up an international index, you must use the OIDs. For more information on indexing, Chapter 10, “Managing Indexes” in the Directory Server Administration Guide.
Table 5-1 lists each locale supported by Directory Server and identifies the associated language tags and OIDs. The old OID is provided for backward compatibility.
Supported Language SubtypesLanguage subtypes can be used by clients to indicate specific attributes in characters of a language other than the default language of a deployment. For example, German users may prefer to see addresses in German when possible. In this case, you can select German as a language subtype for the streetAddress attribute so that users can search for either the English or the German representation of the address. If you specify a language subtype for an attribute, the subtype is added to the attribute name as follows:
attribute;lang-subtype
The example mentioned previously would be displayed in LDIF as follows:
streetAddress;lang-en: 10 Schlossplatz, 76113, Karlsruhe, Germany
streetAddress;lang-de: Schloßplatz 10, 76113, Karlsruhe, DeutschlandTable 5-2 contains the list of supported language subtypes.