Files
mixtape/zero.Web.UI/App/components/localize.vue
T

38 lines
655 B
Vue
Raw Normal View History

2021-03-22 16:00:00 +01:00
<template>
<span>{{output}}</span>
</template>
<script>
import Localization from 'zero/helpers/localization.js';
export default {
name: 'uiLocalize',
props: {
value: {
type: String,
default: null
},
force: {
type: Boolean,
default: false
},
tokens: {
type: Object,
2021-03-23 10:30:14 +01:00
default: null
2021-03-22 16:00:00 +01:00
},
hideEmpty: {
type: Boolean,
default: false
}
},
2021-03-23 10:30:14 +01:00
computed: {
output()
2021-03-22 16:00:00 +01:00
{
2021-03-23 10:30:14 +01:00
return Localization.localize(this.value, { tokens: this.tokens, force: this.force, hideEmpty: this.hideEmpty });
2021-03-22 16:00:00 +01:00
}
}
}
</script>