Language code (Uppercase for the region ?)

Created on 13 March 2013, almost 12 years ago
Updated 23 November 2023, about 1 year ago

Hello,

I was looking in the RFC 4646 in term of letter case for language-code.
Instead of defining language-code in all lowercase, it should use uppercase for the region part.
Example zh-hans => zh-Hans.

So I start talking in this issue : http://drupal.org/node/1231402#comment-7172196

The idea is to stay consistent, in most of the other third-part they follow the recommendation, so when we want to integrate something, we are not consistent, I think is a best practice to follow those recommendation.

Thanks

Feature request
Status

Active

Version

9.5

Component
Language system 

Last updated 1 day ago

  • Maintained by
  • 🇩🇪Germany @sun
Created by

🇨🇭Switzerland sir_squall

Live updates comments and jobs are added and updated live.
  • D8MI

    (Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇳China skyredwang Shanghai

    Just to provide another reference:

    BCP 47: 2.1.1. Formatting of Language Tags

    At all times, language tags and their subtags, including private use
    and extensions, are to be treated as case insensitive: there exist
    conventions for the capitalization of some of the subtags, but these
    MUST NOT be taken to carry meaning.

    Thus, the tag "mn-Cyrl-MN" is not distinct from "MN-cYRL-mn" or "mN-
    cYrL-Mn" (or any other combination), and each of these variations

    Phillips & Davis Best Current Practice [Page 6]

    RFC 5646 Language Tags September 2009

    conveys the same meaning: Mongolian written in the Cyrillic script as
    used in Mongolia.

    The ABNF syntax also does not distinguish between upper- and
    lowercase: the uppercase US-ASCII letters in the range 'A' through
    'Z' are always considered equivalent and mapped directly to their US-
    ASCII lowercase equivalents in the range 'a' through 'z'. So the tag
    "I-AMI" is considered equivalent to that value "i-ami" in the
    'irregular' production.

    Although case distinctions do not carry meaning in language tags,
    consistent formatting and presentation of language tags will aid
    users. The format of subtags in the registry is RECOMMENDED as the
    form to use in language tags. This format generally corresponds to
    the common conventions for the various ISO standards from which the
    subtags are derived. ---- https://www.rfc-editor.org/rfc/rfc5646.html#section-2.1.1

Production build 0.71.5 2024