Skip to content

Commit

Permalink
Get the translations from the window global
Browse files Browse the repository at this point in the history
  • Loading branch information
nWidart committed Sep 16, 2017
1 parent 54bd1c3 commit f1fd144
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Modules/Core/Assets/js/mixins/Translate.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
export default {
props: {
translations: {default: null}
data() {
return {
translations: {},
};
},
methods: {
translate(namespace, name) {
return _.get(this.translations[namespace], name);
}
},
mounted() {
this.translations = window.translations;
}
}

0 comments on commit f1fd144

Please sign in to comment.