gradido/frontend/src/components/LanguageSwitchSelect.vue
MateuszMichalowski 76e5994441
fix(frontend): migration remaining fixes (#3356)
* fix(frontend): fix password update validation, cleanup code, fix pipe operator in i18n issue, fixes to redeem via code.

* fix(frontend): fix transaction links

* fix(frontend): revert changes in admin components file

* fix(frontend): linters fixes
2024-08-19 10:11:17 +02:00

39 lines
925 B
Vue

<template>
<div class="language-switch-select">
<BFormSelect v-model="selected" :options="options" class="selectedLanguage mb-3"></BFormSelect>
</div>
</template>
<script>
export default {
name: 'LanguageSwitch',
props: {
language: { type: String },
},
data() {
return {
selected: null,
options: [
{ value: 'de', text: this.$t('settings.language.de') },
{ value: 'en', text: this.$t('settings.language.en') },
{ value: 'es', text: this.$t('settings.language.es') },
{ value: 'fr', text: this.$t('settings.language.fr') },
{ value: 'nl', text: this.$t('settings.language.nl') },
],
}
},
computed: {
languageObject() {
return this.selected
},
},
watch: {
selected() {
this.$emit('update-language', this.languageObject)
},
},
created() {
this.selected = this.$store.state.language
},
}
</script>