Esto no lo conseguí solucionar. El tema es que un programador quiere
usar el alias es en vez de es_ES, no me preguntéis por que, pero
quiere que sea así, y cuando le lanzas por ejemplo el comando desde
php:
php -r 'setlocale(LC_ALL, "es"); echo strftime("%B"), PHP_EOL;
setlocale(LC_ALL, "en"); echo strftime("%B"), PHP_EOL;'
November
November
Quiere que le devuelva Noviembre, en vez de November.
Ahora mismo está definido así:
root@:~# locale
LANG=es_ES.UTF-8
LANGUAGE=es_ES.UTF-8
LC_CTYPE="es_ES.UTF-8"
LC_NUMERIC="es_ES.UTF-8"
LC_TIME="es_ES.UTF-8"
LC_COLLATE="es_ES.UTF-8"
LC_MONETARY="es_ES.UTF-8"
LC_MESSAGES="es_ES.UTF-8"
LC_PAPER="es_ES.UTF-8"
LC_NAME="es_ES.UTF-8"
LC_ADDRESS="es_ES.UTF-8"
LC_TELEPHONE="es_ES.UTF-8"
LC_MEASUREMENT="es_ES.UTF-8"
LC_IDENTIFICATION="es_ES.UTF-8"
LC_ALL=es_ES.UTF-8
root@:~# locale -a
C
C.UTF-8
es_AR.utf8
es_BO.utf8
es_CL.utf8
es_CO.utf8
es_CR.utf8
es_CU
es_CU.utf8
es_DO.utf8
es_EC.utf8
es_ES
es_ES.iso88591
es_ES.utf8
es_GT.utf8
es_HN.utf8
es_MX.utf8
es_NI.utf8
es_PA.utf8
es_PE.utf8
es_PR.utf8
es_PY.utf8
es_SV.utf8
es_US.utf8
es_UY.utf8
es_VE.utf8
POSIX
En /etc/locale.alias he añadido "es es_ES.UTF-8" :
bokmal nb_NO.ISO-8859-1
bokm�l nb_NO.ISO-8859-1
catalan ca_ES.ISO-8859-1
croatian hr_HR.ISO-8859-2
czech cs_CZ.ISO-8859-2
danish da_DK.ISO-8859-1
dansk da_DK.ISO-8859-1
deutsch de_DE.ISO-8859-1
dutch nl_NL.ISO-8859-1
eesti et_EE.ISO-8859-1
estonian et_EE.ISO-8859-1
finnish fi_FI.ISO-8859-1
fran�ais fr_FR.ISO-8859-1
french fr_FR.ISO-8859-1
galego gl_ES.ISO-8859-1
galician gl_ES.ISO-8859-1
german de_DE.ISO-8859-1
greek el_GR.ISO-8859-7
hebrew he_IL.ISO-8859-8
hrvatski hr_HR.ISO-8859-2
hungarian hu_HU.ISO-8859-2
icelandic is_IS.ISO-8859-1
italian it_IT.ISO-8859-1
japanese ja_JP.eucJP
japanese.euc ja_JP.eucJP
ja_JP ja_JP.eucJP
ja_JP.ujis ja_JP.eucJP
japanese.sjis ja_JP.SJIS
korean ko_KR.eucKR
korean.euc ko_KR.eucKR
ko_KR ko_KR.eucKR
lithuanian lt_LT.ISO-8859-13
no_NO nb_NO.ISO-8859-1
no_NO.ISO-8859-1 nb_NO.ISO-8859-1
norwegian nb_NO.ISO-8859-1
nynorsk nn_NO.ISO-8859-1
polish pl_PL.ISO-8859-2
portuguese pt_PT.ISO-8859-1
romanian ro_RO.ISO-8859-2
russian ru_RU.ISO-8859-5
slovak sk_SK.ISO-8859-2
slovene sl_SI.ISO-8859-2
slovenian sl_SI.ISO-8859-2
spanish es_ES.ISO-8859-1
swedish sv_SE.ISO-8859-1
thai th_TH.TIS-620
turkish tr_TR.ISO-8859-9
de de_DE.UTF-8
fr fr_FR.UTF-8
it it_IT.UTF-8
nl nl_NL.UTF-8
pt pt_PT.UTF-8
ru ru_RU.UTF-8
es es_ES.UTF-8
La verdad es que no sé que más hacer, me recorrido todo google...El
caso es que en un ubuntu 10.04 sí que funciona:
root@moriarty:~# php -r 'setlocale(LC_ALL, "es"); echo strftime("%B"),
PHP_EOL; setlocale(LC_ALL, "en"); echo strftime("%B"), PHP_EOL;'
noviembre
noviembre
Sus locales:
ro...@ubuntu-10.04-lts:~# locale -a
ro...@ubuntu-10.04-lts:~# locale
LANG=es_ES.UTF-8
LANGUAGE=
LC_CTYPE="es_ES.UTF-8"
LC_NUMERIC="es_ES.UTF-8"
LC_TIME="es_ES.UTF-8"
LC_COLLATE="es_ES.UTF-8"
LC_MONETARY="es_ES.UTF-8"
LC_MESSAGES="es_ES.UTF-8"
LC_PAPER="es_ES.UTF-8"
LC_NAME="es_ES.UTF-8"
LC_ADDRESS="es_ES.UTF-8"
LC_TELEPHONE="es_ES.UTF-8"
LC_MEASUREMENT="es_ES.UTF-8"
LC_IDENTIFICATION="es_ES.UTF-8"
LC_ALL=
Lleva tiempo configurado ese ubuntu y por más que miro la config no
veo nada diferente...Excepto el LC_ALL y el LANGUAGE pero también los
he cambiado con export y nada...
No sé que más hacer sinceramente...
Gracias.
Saludos.
Archive:
http://lists.debian.org/CAJ2aOA9N1oxonmF0XUUYNqj9...@mail.gmail.com