Nuxt/examples/vue-i18n/store/index.js
2017-04-10 18:44:08 +02:00

12 lines
193 B
JavaScript

export const state = {
locale: 'en-US'
}
export const mutations = {
SET_LANG (state, locale) {
if (['en-US', 'fr-FR'].indexOf(locale) !== -1) {
state.locale = locale
}
}
}