mel47 Posted January 14, 2024 Posted January 14, 2024 Hi, I updated recently to PW 3.0.233. My website is in french (default) and english. I realized all my dates became english on frontend. I didn't modify locale (fr_CA.UTF8) from languagesupport-module, neither anything from my template. Most used something like strftime('%A %d %b', $item->getUnformatted("date")). An important information is that my prod server is still on PHP 7.2, so it should not normally be deprecated. Does something change in PW? Or what do I should changed at this time? Thanks Mel
poljpocket Posted January 15, 2024 Posted January 15, 2024 What was the version you updated from? We could use this to look for anything that has changed since then. If this is a production site, I would advise against using the dev branch. The latest master version is 229 which should be stable for production.
mel47 Posted January 16, 2024 Author Posted January 16, 2024 Hi, From 3.0.126 Just realized I also have the date in english in backend (in lister for example). And also in another website (in backend but not frontend). Not sure if it was like this before since I never really have a date column in lister. This website in on a PHP7.4 version. Thanks
da² Posted January 16, 2024 Posted January 16, 2024 Hello, since a recent version, and because strftime has been deprecated in PHP 8.1, month and day names must be translated in PW admin, in file /wire/core/WireDateTime.php. Then you don't need to format date by yourself, it will be formatted according to field configuration. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now