Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language tags used in locales #2449

Open
xfq opened this issue Sep 28, 2023 · 2 comments
Open

Language tags used in locales #2449

xfq opened this issue Sep 28, 2023 · 2 comments

Comments

@xfq
Copy link
Contributor

xfq commented Sep 28, 2023

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

Copy link
Collaborator

kazupon commented Sep 29, 2023

I think iso certainly is a mistake from a specification standard. but, nuxt i18n v8 is RC, we cannot do breaking changes can be made.
I think it would be better to put the details in the documentation, and then add language or lang while keeping iso compatibility.

@BobbieGoede
Copy link
Collaborator

We can probably add language as a sort of 'alias' for iso after stable v8 release and fully deprecate/replace iso at some point for v9.

I remember having a hard time finding (or reading) docs describing the standards, using correct/common terminology and referencing the relevant information will definitely help me and other devs out!

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

No branches or pull requests

3 participants