First of all, i am still a newbie with vuejs.
I'm using this Boilerplate Repo for my project.
https://github.com/cretueusebiu/laravel-vue-spa
I do not want to use a bootstrap datepicker because it uses jquery. I do not want to use jquery too.
With vue-i18nhttps://github.com/kazupon/vue-i18n module, all controls in the form can be translated dynamically. But not with vue-datepicker.
I'm using this "tricky" code.
import lang from '~/store/modules/lang'data: {local: {...monthsHead: lang.state.locale == 'en' ? 'January_February_March_April_May_June_July_August_September_October_November_December' \.split('_') :'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember' \.split('_') ,...}}
But but the result appears only after the page refreshes.
Is there a way I can change locale without refresh the page?
Thanks for your attention.
First of all, i am still a newbie with vuejs. I'm using this Boilerplate Repo for my project. https://github.com/cretueusebiu/laravel-vue-spa I do not want to use a bootstrap datepicker because it uses jquery. I do not want to use jquery too. With vue-i18n https://github.com/kazupon/vue-i18n module, all controls in the form can be translated dynamically. But not with vue-datepicker. I'm using this "tricky" code.
import lang from '~/store/modules/lang'
data: {
local: {
...
monthsHead: lang.state.locale == 'en' ? 'January_February_March_April_May_June_July_August_September_October_November_December' \
.split('_') :
'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember' \
.split('_') ,
...
}
}
But but the result appears only after the page refreshes. Is there a way I can change locale without refresh the page? Thanks for your attention.