[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Internationalization in strftime



 Hi, I am using the function strftime to output localized dates. However, the 
localization is properly done.
 I am using the following test program:
#include <time.h>
#include <stdio.h>

main()
{
  struct tm time;
  char string[1000];
  time.tm_mday = 2;
  time.tm_mon = 10;
  time.tm_year = 106;
  strftime(string, 999, "%d/%B/%Y",&time);
  printf(" Localized time: %s\n",string);
}

 In theory, the %B format should print the month in localized form. I am using 
es_ES locale but I get the following:
 Localized time: 02/November/2006

while the comand "date +%d/%B/%Y" outputs the date well localized:
02/noviembre/2006

 Output of locale comand:
LANG=es_ES
LC_CTYPE="es_ES"
LC_NUMERIC="es_ES"
LC_TIME="es_ES"
LC_COLLATE="es_ES"
LC_MONETARY="es_ES"
LC_MESSAGES="es_ES"
LC_PAPER="es_ES"
LC_NAME="es_ES"
LC_ADDRESS="es_ES"
LC_TELEPHONE="es_ES"
LC_MEASUREMENT="es_ES"
LC_IDENTIFICATION="es_ES"
LC_ALL=es_ES

My /etc/locale.gen file contains the following:
es_ES ISO-8859-1
es_ES.UTF-8 UTF-8
es_ES.UTF-8@euro UTF-8
es_ES@euro ISO-8859-15

and I have properly run dpkg-reconfigure locales.

 Any clue?

 Sorry if this is not the proper mailing list for these issues.
 
 Cheers


----------
ADVERTENCIA: La informaci�ncluida en este e-mail es CONFIDENCIAL, siendo para uso exclusivo del destinatario arriba mencionado. Si Usted lee este mensaje y no es el destinatario indicado, le informamos que est�otalmente prohibida cualquier utilizaci�divulgaci�distribuci�/o reproducci�e esta comunicaci�in autorizaci�xpresa en virtud de la legislaci�igente. Si ha recibido este mensaje por error, le rogamos nos lo notifique inmediatamente por esta misma v�a GRAN TELESCOPIO DE CANARIAS, S.A. (gtc@gtc.iac.es) y proceda a su eliminaci�

DISCLAIMER: This message is intended exclusively for its addressee and may contain information that is CONFIDENTIAL and protected by professional privilege. If you are not the intended recipient you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited by law. If this message has been received in error, please immediately notify us via e-mail to GRAN TELESCOPIO DE CANARIAS, S.A. (gtc@gtc.iac.es) and delete it.



Reply to: