Skip to content

Language tags used in locales #2449

Closed
@xfq

Description

Environment

  • Operating System: Darwin
  • Node Version: v18.15.0
  • Nuxt Version: -
  • CLI Version: 3.9.0
  • Nitro Version: -
  • Package Manager: unknown
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

- `iso` (required when using SEO features) - The ISO code used for SEO features and for matching browser locales when using [`detectBrowserLanguage`](/options/browser#detectbrowserlanguage) functionality. Should be in one of those formats:
- ISO 639-1 code (e.g. `'en'`)
- ISO 639-1 and ISO 3166-1 alpha-2 codes, separated by hyphen (e.g. `'en-US'`)

Describe the bug

The name iso here is not quite accurate and I think it can be changed to something like language. If it is too late to update it due to backward compatibility concerns, at least the description in the docs here can be updated.

Both navigator.language(s) and Accept-Language refer to BCP 47 and the IANA Language Subtag Registry, which is based on underlying standards, including the various parts of ISO 639 (639-1, 639-2, 639-3, etc.), ISO 15924 script codes, ISO 3166, and UN M.49 region codes.

Additional context

Related information:

Logs

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions