1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-03-16 05:23:33 +00:00
bramw_baserow/web-frontend/modules/core/components/LangSwitcherDropdown.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
628 B
Vue
Raw Normal View History

<template>
<Dropdown
ref="dropdown"
v-model="language"
:show-search="false"
v-bind="$attrs"
>
<DropdownItem
v-for="locale in $i18n.locales"
:key="locale.code"
:name="locale.name"
:value="locale.code"
></DropdownItem>
</Dropdown>
</template>
<script>
export default {
name: 'LanguageSwitcherDropdown',
computed: {
language: {
get() {
return this.$i18n.locale
},
set(value) {
this.$i18n.setLocale(value)
},
},
},
methods: {
toggle(...args) {
return this.$refs.dropdown.toggle(...args)
},
},
}
</script>