Nuxt/examples/i18n/store/index.js
2017-04-14 11:55:04 +02:00

13 lines
210 B
JavaScript

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