Get the translations from the window global

parent 54bd1c31
export default { export default {
props: { data() {
translations: {default: null} return {
translations: {},
};
}, },
methods: { methods: {
translate(namespace, name) { translate(namespace, name) {
return _.get(this.translations[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