wxt-examples
wxt-examples copied to clipboard
Improve vue-i18n example
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:
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!