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

Improve vue-i18n example#19

Open
nlepage wants to merge 1 commit intowxt-dev:mainfrom
nlepage:patch-1
Open

Improve vue-i18n example#19
nlepage wants to merge 1 commit intowxt-dev:mainfrom
nlepage:patch-1

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