DatePicker can't set locale language.
You can access locales with this.$material.locale
Here is object what you need to pass there: https://github.com/vuematerial/vue-material/blob/dev/src/material.js#L9
thanks so much !
Great!, but what about the cancel and ok buttons?
I am trying to add localisation support to my project but I cannot find any way to override/hack the default Cancel button.
I prefer to avoid switching to another datepicker (as the rest of my project uses vue-material) so if someone has a solution I would be very thankful..
@BorisBrogle Hi,
I found a small solution for that, I think that it could be more clean, but for now it do the job:
so, in my javascript file, I wrote that:
Vue.material.locale.cancelButton = "Annuler"; (for a french translation for example)
the second step is to search/replace in the vue-material.min.js file the following content
search e._v("Cancel") and replace by e._v(e.locale.cancelButton)
for me now I can change the label easily
Hi @ianacid, thanks for your answer.
Yeah I guess the only solution at the moment is to change directly in the package files like you did. I will do it that way then.
Hopefully it will change pretty soon as I saw there are new maintainers on the project!
Most helpful comment
Great!, but what about the cancel and ok buttons?