Skip to content

Support for en-GB locale #3729

Open
Open
@mickaelchanrion

Description

@mickaelchanrion

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions