Locale keys in @nuxt/ui-pro/locale should follow standard BCP-47 codes (fa not fa_ir)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.9k
- Forks
- 1.1k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 57
Description
Environment
Problem
Some locales in @nuxt/ui-pro/locale use non-standard keys such as:
fa_ir(instead offaorfa-IR)pt_br(instead ofpt-BR)nb_no(instead ofnb-NO)- etc.
This causes a mismatch with most i18n setups (e.g., @nuxtjs/i18n) which follow the BCP-47 language tag standard.
For example:
- In Nuxt i18n the locale is
fa(orfa-IR). - In Nuxt UI Pro the locale key is
fa_ir. - Result: developers must create extra mapping logic just to connect i18n with UI components like
ULocaleSelect.
Why it matters
- Inconsistent keys break interoperability between Nuxt UI Pro and
@nuxtjs/i18n. - It forces developers to maintain custom bridges for every mismatch.
- It also confuses users, because the button label may show the raw key (e.g.,
fa_ir) instead of the proper locale name/flag.
Expected
All locale keys in @nuxt/ui-pro/locale should follow standard BCP-47 language codes:
faorfa-IR✅ (notfa_ir❌)pt-BR✅ (notpt_br❌)nb-NO✅ (notnb_no❌)
Suggestions
-
Rename locale keys to valid BCP-47 codes.
Example:fa_ir→fa,pt_br→pt-BR. -
Keep backward compatibility by exporting aliases for old keys for a while, but mark them as deprecated.
-
Update documentation for
ULocaleSelectandlocalesimport to clarify the codes being used.
Impact
Aligning with BCP-47 will make @nuxt/ui-pro/locale plug-and-play with @nuxtjs/i18n and other internationalization libraries, removing the need for manual bridges.
Is this bug related to Nuxt or Vue?
Nuxt
Version
v3.3.2
Reproduction
<script setup lang="ts"> import * as locales from '@nuxt/ui-pro/locale' const model = ref('fa_ir') </script>Description
Short description
Some locale keys in @nuxt/ui-pro/locale are not following the standard BCP-47 format. For example, Persian is exported as fa_ir while Nuxt i18n and most setups expect fa (or fa-IR). This mismatch forces developers to write custom mappings and may happen with other languages as well (pt_br, nb_no, …). Keys should be aligned with BCP-47 (fa, pt-BR, nb-NO, etc.) or at least provide aliases.
Additional context
No response
Logs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the @nuxt/ui-pro/locale exports and the ULocaleSelect usage shown in the reproduction, then compare the locale keys with the BCP-47 examples and @nuxtjs/i18n expectations. Determine the canonical keys and whether old keys need aliases, then update the related ULocaleSelect and locales documentation. Done means the affected keys interoperate without custom mappings and the documented behavior is clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxtjs, typescript
- Domain
- frontend, internationalization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100