Use of Language Codes in LDAP
RFC 2596

Document Type RFC - Proposed Standard (May 1999; No errata)
Obsoleted by RFC 3866
Authors Tim Howes  , Mark Wahl 
Last updated 2013-03-02
Stream IETF
Formats plain text html pdf htmlized bibtex
Stream WG state (None)
Document shepherd No shepherd assigned
IESG IESG state RFC 2596 (Proposed Standard)
Consensus Boilerplate Unknown
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                            M. Wahl
Request for Comments: 2596                  Innosoft International, Inc.
Category: Standards Track                                       T. Howes
                                           Netscape Communications Corp.
                                                                May 1999

                     Use of Language Codes in LDAP

Status of this Memo

   This document specifies an Internet standards track protocol for the
   Internet community, and requests discussion and suggestions for
   improvements.  Please refer to the current edition of the "Internet
   Official Protocol Standards" (STD 1) for the standardization state
   and status of this protocol.  Distribution of this memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (1999).  All Rights Reserved.

1. Abstract

   The Lightweight Directory Access Protocol [1] provides a means for
   clients to interrogate and modify information stored in a distributed
   directory system.  The information in the directory is maintained as
   attributes [2] of entries.  Most of these attributes have syntaxes
   which are human-readable strings, and it is desirable to be able to
   indicate the natural language associated with attribute values.

   This document describes how language codes [3] are carried in LDAP
   and are to be interpreted by LDAP servers.  All implementations MUST
   be prepared to accept language codes in the LDAP protocols.  Servers
   may or may not be capable of storing attributes with language codes
   in the directory.  This document does not specify how to determine
   whether particular attributes can or cannot have language codes.

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   document are to be interpreted as described in RFC 2119 [4].

2. Language Codes

   Section 2 of RFC 1766 [3] describes the language code format which is
   used in LDAP.  Briefly, it is a string of ASCII alphabetic characters
   and hyphens.  Examples include "fr", "en-US" and "ja-JP".

Wahl & Howes                Standards Track                     [Page 1]
RFC 2596             Use of Language Codes in LDAP              May 1999

   Language codes are case insensitive.  For example, the language code
   "en-us" is the same as "EN-US" and "en-US".

   Implementations MUST NOT otherwise interpret the structure of the
   code when comparing two codes, and MUST treat them as simply strings
   of characters. Client and server implementations MUST allow any
   arbitrary string which follows the patterns given in RFC 1766 to be
   used as a language code.

3. Use of Language Codes in LDAP

   This section describes how LDAP implementations MUST interpret
   language codes in performing operations.

   In general, an attribute with a language code is to be treated as a
   subtype of the attribute without a language code.  If a server does
   not support storing language codes with attribute values in the DIT,
   then it MUST always treat an attribute with a language code as an
   unrecognized attribute.

3.1. Attribute Description

   An attribute consists of a type, a list of options for that type, and
   a set of one or more values.  In LDAP, the type and the options are
   combined into the AttributeDescription, defined in section 4.1.5 of
   [1]. This is represented as an attribute type name and a possibly-
   empty list of options.  One of these options associates a natural
   language with values for that attribute.

        language-option = "lang-" lang-code

        lang-code = printable-ascii ; a code as defined in RFC 1766

   Multiple language options may be present on a particular value.

   The language code has no effect on the character set encoding for
   string representations of DirectoryString syntax values; the UTF-8
   representation of UniversalString (ISO 10646) is always used.

   Examples of valid AttributeDescription:

   In LDAP and in examples in this document, a directory attribute is
   represented as an AttributeDescription with a list of values.  Note
   that the data could be stored in the LDAP server in a different

Wahl & Howes                Standards Track                     [Page 2]
RFC 2596             Use of Language Codes in LDAP              May 1999

3.2. Distinguished Names and Relative Distinguished Names

   No attribute description options are permitted in Distinguished Names
   or Relative Distinguished Names.  Thus language codes MUST NOT be
   used in forming DNs.

3.3. Search Filter

   If a language code is present in an AttributeDescription in a search
   filter, then only attribute values in the directory which match the
   base attribute type or its subtype, the language code and the
   assertion value match this filter.
Show full document text