Skip to content

Add cultures that do not follow the xx-xx language/country/region convention #12029

Closed

Description

@CeciAc

@LokiMidgard commented on Thu Apr 25 2019

When you package your application's resources, you must name them using the resource naming conventions that the common language runtime expects. The runtime identifies a resource by its culture name. Each culture is given a unique name, which is usually a combination of a two-letter, lowercase culture name associated with a language and, if required, a two-letter, uppercase subculture name associated with a country or region. The subculture name follows the culture name, separated by a dash (-). Examples include ja-JP for Japanese as spoken in Japan, en-US for English as spoken in the United States, de-DE for German as spoken in Germany, or de-AT for German as spoken in Austria. See the National Language Support (NLS) API Reference at the Go Global Developer Center for a complete list of culture names.

Generating a Resource using Visual Studio (2019) and setting language to different simplified chinise versions result in following files

  • Form1.zh-Hans.resx
  • Form1.zh-Hans-HK.resx
  • Form1.zh-Hans-MO.resx

The subculture does not consists of a two-letter subculture code.


Dokumentdetails

⚠ Bearbeiten Sie diesen Abschnitt nicht. Er ist für die Verknüpfung von docs.microsoft.com zum GitHub-Artikel erforderlich.

Activity

  1. CeciAc commented on Apr 25, 2019

    @CeciAc
    Author

    Hi team,
    I'm moving this here since the contributor is making a suggestion on the original documentation
    best

  2. rpetrusha commented on Apr 25, 2019

    @rpetrusha
    Contributor

    The documentation indicates that this is usually a combination of a two-letter language code and a two-letter country/region code. I'm going to close this as By Design; the qualification is here is adequate, even if some culture/region names violate the rule.

  3. LokiMidgard commented on Apr 26, 2019

    @LokiMidgard

    Thanks for the fast response.

    @rpetrusha The documentation also includes some samples.

    [...] Examples include ja-JP for Japanese [etc ...]

    Could it make sense to include a sample that violate this usally. This would emphasize that there are exceptions.

  4. rpetrusha commented on Apr 29, 2019

    @rpetrusha
    Contributor

    It might be helpful to add some examples with code that are more than two letters in length, @LokiMidgard. I'll reopen this issue and add it to our backlog, as well as to the community contributor's project.

  5. added this to the Backlog milestone on Apr 29, 2019
  6. changed the title [-]The Documentation state that the resource file usese two-letter culture name and two-letter subculture. This seems to be incorrect.[/-] [+]Add cultures that do not follow the xx-xx language/country/region convention[/+] on Apr 29, 2019
  7. modified the milestones: Backlog, October 2019 on Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions