If you are using the Mysql database, the problem must be in the variable lc_time_names
. To check, use the following instruction:
SELECT @@lc_time_names;
The return must be something like this:
+-----------------+
| @@lc_time_names |
+-----------------+
| en_US |
+-----------------+
1 row in set (0.00 sec)
en_US
is the default value in Mysql and probably this is your problem. To change it to pt_BR
, execute the instruction:
SET lc_time_names = 'pt_BR';
This way, when checking again the value of the variable, the return will be:
+-----------------+
| @@lc_time_names |
+-----------------+
| pt_BR |
+-----------------+
1 row in set (0.00 sec)
And so, if you test with the date:
SELECT DATE_FORMAT(CURDATE(), '%d de %M de %Y');
Your return will be:
+-------------------------------------------------+
| SELECT DATE_FORMAT(CURDATE(), '%d de %M de %Y') |
+-------------------------------------------------+
| 05 de fevereiro de 2017 |
+-------------------------------------------------+
1 row in set (0.00 sec)
Note the date in English. However, this way, when you close the session with Mysql, the variable will return to its default value, requiring you to update to pt_BR
every time you connect to the bank. To get around this problem, you can set the variable in the global scope, with the instruction:
SET GLOBAL lc_time_names=pt_BR;
But I can’t say if defining it globally brings some risk to its application.
Is using Mysql?
– Woss
I don’t remember if it’s case sensitive, but I think correct be it
LANGUAGE_CODE = 'pt-BR'
.– mazulo
Remained the same
– Djpremier