We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translation in single file components doesn't work for me.
<template> <div> {{ $t('hello', {name:'Peter'}) }}</div> </div> </template> <i18n> { "en": { "hello": "Hola {name}" }, "es": { "hello": "Hello {name} " } } </i18n>
Also I have tried with: <i18n src="~/locales/common.json"></i18n>
<i18n src="~/locales/common.json"></i18n>
But it didn't work for me either...
Has anyone been able to get it to work?
My environment: Node 18.7.0 "@intlify/nuxt3": "^0.2.3" "nuxt": "3.0.0-rc.6"
The text was updated successfully, but these errors were encountered:
Have you tried it using local variables?
<template> <div> {{ t('hello', {name:'Peter'}) }}</div> </div> </template> <script setup lang="ts"> import { useI18n } from 'vue-i18n'; const { t } = useI18n(); </script> <i18n> { "en": { "hello": "Hola {name}" }, "es": { "hello": "Hello {name} " } } </i18n>
Sorry, something went wrong.
I has the same problem, using const { t } = useI18n() works.
const { t } = useI18n()
But how to use local messages without that two lines of code?
No branches or pull requests
Translation in single file components doesn't work for me.
Also I have tried with:
<i18n src="~/locales/common.json"></i18n>
But it didn't work for me either...
Has anyone been able to get it to work?
My environment:
Node 18.7.0
"@intlify/nuxt3": "^0.2.3"
"nuxt": "3.0.0-rc.6"
The text was updated successfully, but these errors were encountered: