intlify / intlify/nuxt3

Path setting not mapped

Open
#60 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
204
Forks
18
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.