Change date locale
-
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.
-
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.
-
@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
-
@amit-webkul do you have any updates about that?
-
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
-
@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.
-
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