You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For testing purposes I changed the content of App.vue to
<scriptsetuplang="ts">import{useLocale}from'vuetify'const{ t, current }=useLocale()setTimeout(()=>{current.value='de';},3000);</script><template><div><div>content:</div><div>{{ t('title') }}</div></div></template>
This works as expected!
Instead of managing the messages in a large object I would like to move them to their components as described in the vue-i18n docs. I completely removed the messages field from the i18n variable ( because I don't need the messages object anymore ) and added the following to App.vue
Since this doesn't work out of the box I installed the package @intlify/unplugin-vue-i18n the from these docs , updated the package @vitejs/plugin-vue to version 3.2.0. and modified the vite.config.ts file to use the plugin
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
For the sake of reproduction purposes I will try to describe what I've done:
npm create vuetify
vue-i18n
and changed the plugin setup toThis works as expected!
messages
field from thei18n
variable ( because I don't need the messages object anymore ) and added the following to App.vue@intlify/unplugin-vue-i18n
the from these docs , updated the package@vitejs/plugin-vue
to version 3.2.0. and modified the vite.config.ts file to use the pluginUnfortunately I don't know the correct path to use... For now the app does not render the message
Does someone know what's wrong or missing?
Beta Was this translation helpful? Give feedback.
All reactions