Replies: 4 comments 3 replies
-
Fixed it (partially): const messages = {
en: {
hello: 'hello world'
},
ja: {
hello: 'こんにちは、世界'
},
de: {
hello: 'hi!'
},
}
/*
doesn't work
const messages = {
en: {
message: {
hello: 'hello world'
}
},
ja: {
message: {
hello: 'こんにちは、世界'
}
},
de: {
message: {
hello: 'hi!'
}
}
}
*/
const i18n = createI18n({
globalInjection: true,
locale: 'ja',
fallbackLocale: 'en',
legacy: false,
messages
}) |
Beta Was this translation helpful? Give feedback.
1 reply
-
this should do the work: import kk_loc from "/locale/kk.js";
import en_loc from "/locale/en.js";
const i18n = createI18n({
locale: 'ja',
fallbackLocale: 'en',
warnHtmlInMessage: "off",
messages: {
kk: kk_loc,
en: en_loc,
}
}) and localization js file looks like this: export default {
action: "hello there"
} |
Beta Was this translation helpful? Give feedback.
1 reply
-
In my vuetify setup I fixed it like this: import { createI18n } from "vue-i18n"
import { de as vuetifyDe, en as vuetifyEn } from "vuetify/locale"
import customDe from "./de.json"
export const i18n = createI18n({
legacy: false,
locale: "de",
fallbackLocale: "en",
messages: {
de: {
// we add the vuetify locales to our locale to prevent warnings in the console
$vuetify: vuetifyDe,
...customDe,
},
en: {
// we add the vuetify locales to our locale to prevent warnings in the console
$vuetify: vuetifyEn,
},
},
}) |
Beta Was this translation helpful? Give feedback.
1 reply
-
silentTranslationWarn works for me |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Setup is
package.json
vite.config.js
index.js
and finally App.vue
npm run dev
and navigating tolocalhost:<port>
Will always display "message" and the console tells meWhat am I missing?
Beta Was this translation helpful? Give feedback.
All reactions