Get the translations from the window global

parent 54bd1c31
export default {
props: {
translations: {default: null}
data() {
return {
translations: {},
};
},
methods: {
translate(namespace, name) {
return _.get(this.translations[namespace], name);
}
},
mounted() {
this.translations = window.translations;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment