nuxt3 icon indicating copy to clipboard operation
nuxt3 copied to clipboard

Path setting not mapped

Open todaynogada opened this issue 3 years ago • 0 comments

export default { // ... buildModules: ['@intlify/nuxt3'], // config for @intlify/nuxt3 intlify: { vueI18n: 'vue-i18n.mjs' } }

vue-i18n.mjs

// The configuration must be returned with an async function. export default async () => ({ locale: 'en', messages: { en: { hello: 'hellotest' }, ja: { hello: 'こんにちは、{name}!' } } })

index.vue

import { useI18n } from 'vue-i18n'

{{ t("hello") }}

const { t, te } = useI18n();

Returns hello as a string.

Also, how can I change to another language if I already use en?

For example, I want to convert by selecting a language in the select box.

Do you have a guide on this?

todaynogada avatar Apr 29 '22 19:04 todaynogada