Language tags
You can learn more about language tags using the information provided here.
Note:
- For language tags to work correctly, the database must be configured as a UTF-8 database.
- After enabling the language tag, if you associate language tags with the attributes of an entry, the server returns the entry with the language tags. This occurs even if you later disable the language tag feature. Do not disable the language tag feature after it has been enabled.
The term, language tags, defines a mechanism that enables the directory
to associate natural language codes with values held in a directory
and enables clients to query the directory for values that meet certain
natural language requirements. The language tag is a component of
an attribute description. The language tag is a string with the prefix lang-,
a primary subtag of alphabetic characters and, optionally, subsequent
sub-tags connected by a hyphen (-). The subsequent sub-tags can be
any combination of alphanumeric characters, only the primary subtag
needs to be alphabetic. The sub-tags can be any length, the only limitation
is that the total length of the tag cannot exceed 240 characters.
Language tags are case insensitive; en-us and en-US and EN-US are
identical. Language tags are not allowed in components of DN or RDNĀ®. Only one
language tag per attribute description is allowed.
Note: The language
tags are mutually exclusive with unique attributes. If you have designated
a particular attribute as an unique attribute, it cannot have language
tags associated with it.
If the language tags are included when data is added to a directory,
the language tags can be used with the search operations to selectively
retrieve attribute values in specific languages. If a language tag
is provided in an attribute description within the requested attribute
list of a search, the attribute values in a directory entry that has
the same language tags are to be returned. Thus for a search like:
idsldapsearch -b "o=sample" (objectclass=organization) description;lang-enthe
server returns values of an attribute "description;lang-en", but does
not return values of an attributedescription or description;lang-fr.If a request is made specifying an attribute without providing a language tag, then all attribute values regardless of their language tag are returned.
The attribute type and the language tag are separated with a semicolon
(;) character.
Note: RFC2252 allows the semicolon character to be
used in the "NAME" part of an AttributeType. However, because this
character is being used to separate the AttributeType from the language
tag, its usage in the "NAME" part of an AttributeType is no longer
permitted as specified in draft-ietf-ldapbis-models-07.txt.
For example, if the client requests a "description" attribute,
and a matching entry contains:
objectclass: top
objectclass: organization
o: Software GmbH
description: software
description;lang-en: software products
description;lang-de: Softwareprodukte
postalAddress: Berlin 8001 Germany
postalAddress;lang-de: Berlin 8001 Deutschlandthe server
returns: description: software
description;lang-en: software products
description;lang-de: SoftwareprodukteIf the search requests a description;lang-de attribute,
then the server returns:
description;lang-de: SoftwareprodukteThis type of server processing enables directories that contain multi-lingual data to support clients that operate in various languages. If an application is implemented correctly, the German client sees data entered for the attribute lang-de only, and the French client sees data entered for the lang-fr attribute only.
To determine whether the language tag feature is enabled, issue
a root DSE search specifying the attribute ibm-enabledCapabilities .
idsldapsearch -b "" -s base objectclass=* ibm-enabledCapabilitiesIf
the OID "1.3.6.1.4.1.4203.1.5.4" is returned, the feature is enabled. If the language tag support is not enabled, any LDAP operation
that associates a language tag with an attribute is rejected with
the error message:
LDAP_NO_SUCH_ATTRIBUTE