antares/src/renderer/store/modules/settings.store.js

25 lines
435 B
JavaScript
Raw Normal View History

2020-05-29 18:19:35 +02:00
'use strict';
import i18n from '@/i18n';
export default {
namespaced: true,
strict: true,
state: {
2020-05-30 12:54:05 +02:00
locale: 'en-US'
2020-05-29 18:19:35 +02:00
},
getters: {
getLocale: state => state.locale
},
mutations: {
SET_LOCALE (state, locale) {
state.locale = locale;
i18n.locale = locale;
}
},
actions: {
changeLocale ({ commit }, locale) {
commit('SET_LOCALE', locale);
}
}
};