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

Support for en-GB locale #3729

Open
mickaelchanrion opened this issue Mar 29, 2025 · 0 comments
Open

Support for en-GB locale #3729

mickaelchanrion opened this issue Mar 29, 2025 · 0 comments
Labels
enhancement New feature or request triage v3 #1289

Comments

@mickaelchanrion
Copy link
Contributor

mickaelchanrion commented Mar 29, 2025

Description

Currently, Nuxt UI supports some region-specific locales (e.g., fa-IR), but for English, the only available locale is en. This causes issues when an application is configured with en-GB as the desired locale, because Nuxt UI falls back to en, which seems to follow US conventions (e.g., Sunday as the first day of the week in the calendar).

For example, my Nuxt app is configured as follows:

export default defineNuxtConfig({
  i18n: {
    defaultLocale: 'en',
    locales: [{ name: 'English', code: 'en', language: 'en-GB', file: 'en.ts' }],
  },
})

Since Nuxt UI only recognizes en, the calendar incorrectly starts the week on Sunday, instead of Monday as expected for en-GB.

The good thing is that Reka behaves correctly is the locale is set to en-GB.

Proposed solution

  • Either add en-GB as a distinct locale in Nuxt UI
  • Or provide a way to explicitly define locale settings for relevant components globally (e.g., date-related components like the calendar)
<UApp :locale="locales[locale]" language="en-GB">

Current workaround

It's possible to manually override the start of the week locally in each calendar instance, but this is inconvenient for maintaining consistency across the application.

Why this matters

English has multiple region-specific differences beyond just the start of the week (e.g., date formats, spelling conventions). Supporting en-GB properly would improve localization and user experience for apps targeting a British English audience.

Would love to hear your thoughts on this! Thanks for your great work on Nuxt UI. 🚀

Additional context

No response

@mickaelchanrion mickaelchanrion added enhancement New feature or request triage v3 #1289 labels Mar 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage v3 #1289
Projects
None yet
Development

No branches or pull requests

1 participant