1
0
mirror of https://github.com/nuxt/nuxt.git synced 2025-02-24 09:28:41 +00:00
Nuxt/examples/i18n/store/index.js
2017-05-21 21:01:08 +02:00

13 lines
218 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
}
}
}