Cannot translate the value of keypath 'language_option'. Use the value of keypath as default.
See original GitHub issueI followed the documentation and read every issue related to this error, but still couldn’t fix it. For some reason it can’t translate it, but it doesn’t tell me why. It only outputs this line into the console:
Cannot translate the value of keypath 'language_option'. Use the value of keypath as default.
vue & vue-i18n version
2.6.10, 8.11.2
Full code:
https://github.com/MRVDH/mapping-north-korea/tree/2-Add-multi-language-support/client
Reduced code:
main.js:
import Vue from 'vue';
import Vuetify from 'vuetify';
import VueI18n from 'vue-i18n';
import App from './App';
import router from './router';
import 'vuetify/dist/vuetify.min.css';
Vue.config.productionTip = false;
Vue.use(Vuetify);
Vue.use(VueI18n);
/* eslint-disable no-new */
new Vue({
i18n: {
fallbackLocale: 'en'
},
el: '#app',
router,
components: { App },
template: '<App/>'
});
Component file:
<template>
<v-toolbar app>
<v-btn @click.stop="toggleLanguage()">
{{ $t('language_option') }}
</v-btn>
</v-toolbar>
</template>
<i18n>
{
"en": {
"language_option": "한국어"
},
"ko": {
"language_option": "English"
}
}
</i18n>
<script>
export default {
name: 'Example',
data () {
return {
locale: 'en'
};
},
methods: {
toggleLanguage: function () {
console.log('toggle!');
}
}
};
</script>
Issue Analytics
- State:
- Created 4 years ago
- Comments:11
Top Results From Across the Web
Vue: vue-i18n: Cannot translate the value of keypath, Use the ...
Use the value of keypath as default. I checked if the plugin is working by console.log(this.$i18n.locale). And the result was "en".
Read more >Cannot translate the value of keypath 'message.welcome ...
I get this error: vue-i18n.common.js:16 [vue-i18n] Cannot translate the value of keypath 'message.welcome'. Use the value of keypath as default.
Read more >I18n - Cannot translate the value of keypath - Vue Forum
Hello everyone, I am using i18n for translations on my website. It was working fine till 6th October 2018, but I'm getting the...
Read more >Cannot translate the value of keypath - Laracasts
Hi! Have this error on every place i set text app.js:32228 [vue-i18n] Cannot translate the value of keypath What is the problem ?...
Read more >[vue-i18n] Cannot translate the value of keypath 'message ...
Use the value of keypath as default. #1150. jackDani16 posted onGitHub. This is my en.json: { "message ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I still face the same issue despite the steps described. Warnings are not silenced and I keep getting the following, when locale
en
is active. No issues whende
is active.Setup:
en.ts
de.ts
Oh sorry before return of data :