mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-29 18:09:34 -05:00
28 lines
745 B
Vue
28 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>
|