How to localize QDatetime
JohhnyFittizio last edited by
Hi guys. I need help with localization.
In my app I am using I18n. The user can switch two languages: English and Turkish
I am using the QDatetime component, and I need to show the days and months names in turkish too.
I see that there are no more the props
In the docs there is the following concerning localization:
The day and month names are taken care of by default through Quasar I18n.
Does it mean that it should work automatically when the user switch language?
Then why isn’t working for me?
No matter what I try, I still see the names in english.
I have tried passing as lang code name in quasar I18n both
Do you know how this can be done?
genyded last edited by
Well, here is the I18N documentation, which clearly states that for Quasar components you need the language packs from this github repo if you did not include them when you setup the project. Then when you switch languages, you need to set (and watch) the $q.i18n.lang option as explained in the docs.
As stated another option is to do them yourself in each instance, but that is tedious and time consuming.