File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 27
27
</div >
28
28
</div >
29
29
<div class =" hidden md:flex flex-row space-x-2 items-center justify-center" >
30
+ <div v-if =" $config.laguageSwitcher.enabled" >
31
+ <nuxt-link v-for =" locale in availableLocales" :key =" locale.code" :to =" switchLocalePath(locale.code)" class =" text-gray-300 hover:text-white" >{{ locale.name }}</nuxt-link >
32
+ </div >
30
33
<div v-if =" $config.firebase.enabled" >
31
34
<div v-if =" !user" @click =" signInUser" class =" active cursor-pointer text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-bold" >{{ $t('nav.signIn')}}</div >
32
35
<div v-else @click =" signOutUser" class =" active cursor-pointer text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-bold" >{{ $t('nav.signOut')}}</div >
@@ -93,6 +96,9 @@ export default {
93
96
computed: {
94
97
user () {
95
98
return this .$store .state .user
99
+ },
100
+ availableLocales () {
101
+ return this .$i18n .locales .filter (i => i .code !== this .$i18n .locale )
96
102
}
97
103
},
98
104
data () {
Original file line number Diff line number Diff line change @@ -86,6 +86,9 @@ export default {
86
86
// three-bounce
87
87
// wandering-cubes
88
88
} ,
89
+ laguageSwitcher : {
90
+ enabled : true ,
91
+ } ,
89
92
strings : {
90
93
en_US : {
91
94
download : 'download' ,
You can’t perform that action at this time.
0 commit comments