Bagisto Forum

    Bagisto

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

    Change date locale

    General Discussion
    3
    7
    240
    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.
    • M
      MChiesa last edited by

      I developed a website based on Bagisto v2.
      Changing the language in the admin panel, the texts become in Italian but the dates do not change format: they remain in the Y-m-d format and not d/m/Y.
      As well as the names of the days and months always remain in English.
      I tried to act at the code level, within the different service providers with the Carbon::setLocale('it'); statement, but nothing changed.

      Can you help me? Thanks.

      A 1 Reply Last reply Reply Quote 0
      • A
        amit-webkul @MChiesa last edited by

        Hello @MChiesa ,

        As per your query, I have checked it and would like to ask for more details about the issue. Since we are using the date from the database in the usual YYYY-MM-DD format, I would be happy to assist further if you could provide more information.

        M 2 Replies Last reply Reply Quote 0
        • M
          MChiesa @amit-webkul last edited by

          @amit-webkul the problem is like that: if I use

          \Illuminate\Support\Carbon::parse($date)->format('D d F Y');
          

          I obtain

          Thu 24 October 2024
          

          And not (in italian)

          Gio 24 Ottobre 2024
          
          1 Reply Last reply Reply Quote 0
          • M
            MChiesa @amit-webkul last edited by

            @amit-webkul do you have any updates about that?

            1 Reply Last reply Reply Quote 0
            • Rishabh-Webkul
              Rishabh-Webkul last edited by

              Hello @MChiesa

              Kindly let us know exactly where you need to change the date locale in the admin backend panel or frontend store?

              Kindly provide us with the image for the reference this will help us to resolve your query.

              Thanks & Regards

              M 1 Reply Last reply Reply Quote 0
              • M
                MChiesa @Rishabh-Webkul last edited by

                @Rishabh-Webkul everywhere. Both for dates coming from the backend and for those generated by the front-end components. But I have the impression that the way they have been handled I need to go and change the format of each one.

                1 Reply Last reply Reply Quote 0
                • Rishabh-Webkul
                  Rishabh-Webkul last edited by

                  Hello @MChiesa

                  We will check this on our end and will raise the PR on GitHub if there are changes required.

                  For now, you have to manage it from the code end.

                  Thanks & Regards

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