We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

PHP Setlocale for Dates doesn't work

Im not able to do a simple setlocale(LC_ALL, 'es_ES'); echo strftime("%A"); It always shows it in English. I'm developing in windows phalcon version x64 VC11 NTS last version. I'm coding from a phalcon generated template with the windows CMD, I'm trying to make that code works on every place(even controllers, views, etc...) but i can just make it... Please help.

edited Sep '15

What does it show in english?

echo strftime("%A"); always shows Friday...

What does it shows in english?

edited Sep '15

On Windows, locales do not use the POSIX format: https://msdn.microsoft.com/en-us/library/39cwe7zf.aspx

Having the same problem with phalcon 3.2, in volt file calling date('d F Y', $x) always shows the month in english no matter where I write setlocale function.

Do you guys have the desired locales installed for the OS?

# list available locales
locale -a
# add locale
sudo locale-gen hu_HU
sudo locale-gen hu_HU.UTF-8
# update
sudo update-locale

@Lajos I'm on osX with nginx and php-fpm installed with brew. And yes the locale I need is installed .I tested different environment settings with no success..