Skip to content

Commit

Permalink
Fixing language problems ... (attempt 3)
Browse files Browse the repository at this point in the history
  • Loading branch information
MacKey-255 committed Jul 31, 2023
1 parent 5a38f81 commit 1c45654
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/layout/LangSwitcher.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<button @click="changeLocale(nextLocale)">
<span :class="'fi fi-' + $t('lang')"></span>
<span :class="icon_class"></span>
</button>
</template>

Expand All @@ -10,6 +10,11 @@ export default {
computed: {
nextLocale() {
return this.$i18n.locale === 'en' ? 'es' : 'en';
},
icon_class() {
const lang = `fi fi-${this.$t('lang')}`;
console.log('Locale:', lang, this.$i18n.locale);
return lang;
}
},
methods: {
Expand Down

0 comments on commit 1c45654

Please sign in to comment.