Commit b75b9e98 authored by Manuel Tancoigne's avatar Manuel Tancoigne

Improve language selection

parent afe48445
<template>
<i-select v-model="$root.$i18n.locale">
<i-select-option v-for="(locale, i) in locales"
:key="`Lang${i}`"
:value="locale"
:label="$t(`locales.${locale}`)" />
</i-select>
<i-dropdown>
<i-button variant="dark">
{{ $t(`locales.${$root.$i18n.locale}`) }}
</i-button>
<i-dropdown-menu>
<i-dropdown-item v-for="(locale, i) in locales"
:key="`Lang${i}`"
href="#"
@click.native.prevent="$root.$i18n.locale = locale">
{{ $t(`locales.${locale}`) }}
</i-dropdown-item>
</i-dropdown-menu>
</i-dropdown>
</template>
<script>
export default {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment