November 2017
Beginner to intermediate
398 pages
8h 42m
English
For now, nothing really changed in the app, so let's add the page that will allow us to select the language.
import PageLocale from './components/PageLocale.vue'
{ path: '/locale', name: 'locale', component: PageLocale },
<div v-if="$route.name !== 'locale'"> <router-link :to="{ name: 'locale' }">{{ $t('change-lang') }} </router-link> </div>
As you can see in the preceding code, we use the $t provided by vue-i18n to display a translated text. The argument correspond to the key in the locale ...
Read now
Unlock full access