Nuxt/examples/vue-i18n/store/index.js

12 lines
193 B
JavaScript
Raw Normal View History

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