No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How to localize QDatetime

    Framework
    2
    2
    453
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      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 day-names and month-names.

      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 tr and tr-TR.

      Do you know how this can be done?
      Thanks!

      1 Reply Last reply Reply Quote 0
      • G
        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.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post