Skip to content

Conversation

@hywax
Copy link
Member

@hywax hywax commented Nov 28, 2025

πŸ”— Linked issue

Resolves #5552 (comment)

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

image

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@benjamincanac
Copy link
Member

benjamincanac commented Nov 28, 2025

@hywax Following up on #5552 (comment) here. I meant the translations are exactly the same as the en file. Did you check my solution with extendLocale? I'm not entirely against adding a British locale file but then we need to add hundreds of duplicates for each:
CleanShot 2025-11-28 at 12 52 33@2x

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 28, 2025

npm i https://pkg.pr.new/@nuxt/ui@5561

commit: 09a750c

@hywax
Copy link
Member Author

hywax commented Nov 28, 2025

Well, actually, there will be some differences in each locale.

For example, we can take:

there aren't that many differences

If you are confused by the 98% of literals in the copy, you can do the following. But I repeat, the words are insignificant, they may differ.

import type { Messages } from '../types'
import { defineLocale } from '../composables/defineLocale'
import en from './en'

export default defineLocale<Messages>({
  name: 'English (British)',
  code: 'en-GB',
  messages: en.messages
})

@benjamincanac benjamincanac changed the title feat(locale): add British English language feat(locale): add English (United Kingdom) language Nov 28, 2025
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
@benjamincanac
Copy link
Member

I think we should keep Nuxt UI's built-in locales at the language level only (en, fr, de, etc.) and avoid adding region variants when the translation content is identical. Otherwise, we'll end up maintaining a long list of duplicated locale files (en-US, en-CA, en-AU, etc.).

Although I'd recommend using extendLocale in most cases: const enGB = extendLocale(en, { code: 'en-GB' }), since en-GB is a particularly common locale and has been requested quite often, I think we can make an exception!

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

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

InputDate - Incorrect Day/Month order

2 participants