Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Improve vue-i18n example #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Improve vue-i18n example #19

wants to merge 1 commit into from

Conversation

nlepage
Copy link

@nlepage nlepage commented Apr 11, 2024

Problem

When running the vue-i18n example, and switching the browser to korean using this command (on Linux):

LANGUAGE=ko pnpm dev

The translations from vue-i18n are still in english, although "vanilla" translation are in korean:

image

image

Solution

Give the locale to vue-i18n in i18n.ts works fine.

Additional info

Using as any for messages isn't friendly with recommended Typescript eslint rules, switching to as Record<I18nLocales, I18nSchema> is more accurate.

Thanks for your work!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant