I'm trying to make an app with multiple languages.
I did what the documentation says but it does not work.
this my code.
window.Vue = require('vue');
import Vuetify from './Vuetify/vuetify';
import en from './Vuetify/Lang/en/en.ts';
import es from './Vuetify/Lang/es/es.ts';
Vue.use(Vuetify, {
lang: {
locales: {
es,
en,
},
current: 'es'
}
})
const app = new Vue({
el: '#app',
components: {
"vue-landing": require('./components/ExampleComponent.vue'),
},
created() {
this.$vuetify.lang.current = 'es'
},
}).$mount('#app');
In my component
<template>
<v-content>
{{ $vuetify.t('noDataText') }}
</v-content>
</template>
Everything compiles normal without errors, but it does not translate anything. the results are always what I write within the function.
In this case what appears is
noDataText
this.$vuetify.lang.current = 'en'
– C-Jay