fix: components not updating correctly when changing language /2

Fixes :
- lacking i18n.global.locale.value in datetime.ts
- remove a test in i18n.ts that was always false in past versions of the code because i18n.global.locale is an object and lang is a string
- correctly type createI18n with <false> for legacy to solve wrong TypeScript error (see https://github.com/intlify/vue-i18n/issues/785, https://github.com/intlify/vue-i18n/issues/889#issuecomment-1017250573)

Fixes: #1597, #1772, and possibly other related issues.
This commit is contained in:
Massedil
2025-06-16 16:44:01 +02:00
parent f9f31f9f53
commit af7fb2bc15
2 changed files with 2 additions and 7 deletions

View File

@@ -79,7 +79,7 @@ function formatDateTimeString(
return format.format(parseDateTime(value));
}
const locale = () => i18n.global.locale.replace("_", "-");
const locale = () => i18n.global.locale.value.replace("_", "-");
export {
formatDateISOStringWithoutTime,