Skip to content

CultureInfo.Name should explain three-letter language names #7465

Closed
@svick

Description

@svick

The documentation for CultureInfo.Name says:

The culture name in the format languagecode2-country/regioncode2 [..]. languagecode2 is a lowercase two-letter code derived from ISO 639-1.

This is not correct. For many languages, the language code part is three letters. (Also, what does "derived" actually mean?)

The documentation for CultureInfo.TwoLetterISOLanguageName keeps talking about "two-letter code", but it also clarifies this a bit:

If ISO 639-1 does not define a two-letter language code for a particular culture, the TwoLetterISOLanguageName property returns a string that consists of three or more letters.

As far as I can tell, for all languages with three-letter codes, their ISO 639-3 code is used.

I think this should be clarified:

  1. Both Name and TwoLetterISOLanguageName should make it clear that the name can be two or three letters.
  2. The documentation should specify that ISO 639-3 codes are used for three-letter languages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pri3Indicates issues/PRs that are low priorityarea-System.Globalizationhelp wantedGood for community contributors to help [up-for-grabs]

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions