Bug #9054 date_format with local language output for month name etc.
Submitted: 8 Mar 2005 19:42 Modified: 21 Sep 2006 21:42
Reporter: Emanuele Dolis Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version: OS:
Assigned to: CPU Architecture:Any
Triage: D5 (Feature request)

[8 Mar 2005 19:42] Emanuele Dolis
Description:
Hello everyone, 
I've looked for this silly matter around both the documentation and the forums, but I've found no answer. 
So I submit the thing as a feature request:
It would be useful being able to configure mysql so that the literal format of date_format (%M, %a, %b etc.) and similar functions give an output in a local language (eg "Gennaio" instead of "January"). 
I know, of course that a CASE with the numeric value matching the appropriate string could do (also ENUM if the data must be thrown into a table), but I think there should be a direct and efficient way to do it using the mysql appropriate functions. 

A more portable solution could be relating this conversion to some flag identifying local language passed from the host to the server..
Thanks
ema

How to repeat:
.
[27 May 2006 13:37] Valeriy Kravchuk
Thank you for a feature request. It looks reasonable. At least, other RDBMSes, like Oracle, provide this feature.
[21 Sep 2006 21:42] Peter Gulutzan
A patch for date_format is now in the server source code.
An example of how it works:

mysql> set names utf8;
Query OK, 0 rows affected (0.00 sec)

mysql> set lc_time_names='ja_JP';
Query OK, 0 rows affected (0.00 sec)

mysql> select date_format(s1,'%W') from t;
+----------------------+
| date_format(s1,'%W') |
+----------------------+
| 日曜日            |
+----------------------+
1 row in set (0.00 sec)

See also bug#17512.