Internet Engineering Task Force M. Sporny
Internet-Draft Digital Bazaar
Intended status: Informational May 25, 2019
Expires: November 26, 2019

BCP 47 Extension D


This document specifies an Extension to BCP 47 which provides subtags that specify language direction.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on November 26, 2019.

Copyright Notice

Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ( in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document.

Table of Contents

1. Introduction

[RFC5646] permits the definition and registration of language tag extensions "that contain a language component and are compatible with applications that understand language tags". This document defines an extension for identifying text direction using language tags. The "singleton" identifier for this extension is 'd'.

1.1. Requirements Language

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

2. RFC5646 Required Information

Language tags, as defined by [RFC5646], are useful for identifying the language of content. Some operating environments also use the language tag to determine text direction, which can be problematic. This extension provides a mechanism for explicitly stating the direction of a specific language-tagged string.

2.1. Summary

The subtags available for use in the 'd' extension consist of the values 'ltr', 'rtl', and 'auto' for expressing text direction that is "left-to-right", "right-to-left", and "automatically detected", respectively.

For example, the language tag "ar-d-rtl" consists of:

Only the first occurrence of an attribute or key conveys meaning in a language tag. When interpreting tags containing the direction extension, duplicate attributes or keywords are ignored in the following way: ignore any attribute that has already appeared in the tag and ignore any keyword whose key has already occurred in the tag.

2.1.1. Canonicalization

As required by [RFC5646], the use of uppercase or lowercase letters is not significant in the subtags used in this extension. The canonical form for all subtags in the extension is lowercase. The canonical order of attributes is in [US-ASCII] order (that is, numbers before letters, with letters sorted as lowercase US-ASCII code points). The canonical order of keywords is in [US-ASCII] order by key. The order of subtags within a keyword is significant; the meaning of this extension is altered if those subtags are rearranged. Thus, the canonical form of the extension never reorders the subtags within a keyword.

2.2. Registration Form

Per RFC 5646, Section 3.7:

Identifier: d
Description: Text Direction
Comments: Subtags for the identification of language direction. Used to
    influence input mechanisms and graphical rendering.
Added: 2019-05-25
Authority:     Manu Sporny

3. Acknowledgements

Thanks to Dan Burnett, Charles "chaals" Nevile, Dave Longley, Ivan Herman, Rob Sanderson, Richard Ishida, Addison Philips, Benjamin Young, Ivan Herman, Pierre-Antoine Champin, and Eric Prud'hommeaux for the discussion that led to this specification.

4. IANA Considerations

This document will require IANA to insert the record in Section 2.2 into the Language Extensions Registry, according to Section 3.7. Extensions and the Extensions Registry of "Tags for Identifying Languages" in [RFC5646].

This document does not require IANA to create or maintain a new registry or otherwise impact IANA.

5. Security Considerations

The security considerations for this extension are the same as those for [RFC5646]. See RFC 5646, Section 6, Security Considerations.

6. Normative References

[RFC5646] Phillips, A. and M. Davis, "Tags for Identifying Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646, September 2009.
[US-ASCII] International Organization for Standardization, "ISO/IEC 646:1991, Information technology -- ISO 7-bit coded character set for information interchange.", 1991.

Author's Address

Manu Sporny Digital Bazaar EMail: