locale config not work ,here is my code:
import Vue from 'vue'
import VeeValidate, { Validator } from 'vee-validate'
import cn from 'vee-validate/dist/locale/zh_CN'
Validator.addLocale(cn)
Vue.use(VeeValidate, {
locale: 'cn'
})
But , after set the prompt still english .
I use Nuxt.js in a couple of projects and I didn't face this issue. You should add the locale after the installation/configuration, and I suggest you use the new API method localize
import Vue from 'vue'
import VeeValidate, { Validator } from 'vee-validate'
import cn from 'vee-validate/dist/locale/zh_CN'
Vue.use(VeeValidate)
// adds and sets the validator locale
Validator.localize('cn', cn)
Thanks so much , you have resolved my issue .
@logaretm I don't think this is a good solution.
I want to implement a hot reload of language in my Nuxt app. With above solution locale is loaded when plugin is loaded. But how to hot reload it?
Most helpful comment
I use Nuxt.js in a couple of projects and I didn't face this issue. You should add the locale after the installation/configuration, and I suggest you use the new API method
localize