Sharing information about Date in french

rodeokid

Member
Hi, i would just like to share this info with other french users like me.
Last night i just made the update on my server to MariaDB 10.3.8 and one major improvements for us is that finally we have a simple solution to translate date in french... no more need to write script to replace english term with french one.

date_format function now accept a third argument to translate in whatever language you need.. so you can use it directly in your query like this:

Code:
$query->setQuery('SELECT id, date_format(dateabsence, "%d %M %Y", "fr_FR") as absencedate,

So you give the date to look, and the format you want... but now you can add the language you need as a third argument. So for a date in my database like this: 2018-07-10, with this query this is what i get: 10 juillet 2018

Just want to share this info cause as a french user, in the past i used a lot of homemade script to translate.

Have fun !
rodeokid
 
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top