Interpolations not working on production build
itsmnthn opened this issue · comments
Manthankumar Satani commented
Interpolations not working on nuxt3 build
Declaration
{
welcome: 'Welcome {name}!',
hello: 'Hello',
}
Usage
<script lang="ts" setup>
import { useI18n } from 'vue-i18n'
const { t } = useI18n({ useScope: 'global' })
</script>
<template>
<div class="p-10">
{{ t('hello') }}
<br />
{{ t('welcome', { name: 'buddy' }) }}
</div>
</template>
Anbuselvan Annamalai commented
Is there any update on this?
Manthankumar Satani commented
Nope
Jakub Záruba commented
I can't even use symbol "{" or "}" in translated expression.
For:
welcome: 'Welcome {name}!'
I got:
SyntaxError: Unterminated closing brace
en_US.json: Cannot read properties of undefined (reading 'message')
without braces works everything fine
@intlify/nuxt3@^0.2.3
nuxt3/3.0.0
Igor commented
+1
Interpolations not working on nuxt3 for production build
"@intlify/nuxt3": "^0.2.3", "nuxt": "^3.0.0",
UPD:
Solved the problem by doing like in this example: https://github.com/intlify/vue-i18n-next/tree/master/examples/frameworks/nuxt3
I didn't use from @intlify/nuxt3