mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-24 08:51:25 -05:00
29 lines
745 B
Vue
29 lines
745 B
Vue
|
<template>
|
||
|
<span
|
||
|
class="lang-component"
|
||
|
v-html="getLanguageString">
|
||
|
</span>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
props: {
|
||
|
cStrings: {
|
||
|
type: Object
|
||
|
}
|
||
|
},
|
||
|
|
||
|
computed: {
|
||
|
getLanguageString() {
|
||
|
if (this.cStrings.hasOwnProperty(this.$store.getters.getAppLang)) {
|
||
|
return this.cStrings[this.$store.getters.getAppLang];
|
||
|
} else if (this.cStrings.hasOwnProperty(this.$store.getters.getAppDefaultLang)) {
|
||
|
return this.cStrings[this.$store.getters.getAppDefaultLang];
|
||
|
} else {
|
||
|
return "";
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
</script>
|