Spanish Languaje Dates and Calendar

Found a bug? Tell us!!
Post Reply
ArsNatura

Spanish Languaje Dates and Calendar

Post by ArsNatura »

Hi,
This is my system:
Apache 2.0.55 (win32)
PHP 5.1.1
MySQL Server 5.0
Serendipity 0.9.1


And I have a problem with the text of the dates and calendar. All my Serendipity is in Spanish, but the dates are in Stonian!!
If I change the languaje of my Serendipity to English, French, German, etc the calendar is OK (in english, french, german...). But in spanish don't work.

My Internet Explorer have as unique languaje the spanish, and if i execute this:

Code: Select all

<?php
	$idiomas = split(",", $_SERVER['HTTP_ACCEPT_LANGUAGE']);
	foreach( $idiomas as $lg ) {
	  if (substr($lg,0,2) == "es"){
	    echo("español");
	  };	
   }
?>
this returns this exit:

Code: Select all

español
That is right.

Can you help me?
I want see the dates and the calendar in spanish.
Thanks and sorry for my bad english.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Spanish Languaje Dates and Calendar

Post by garvinhicking »

Serendipity uses the "Locale" system to print dates. Your webserver thus must have installed the locale of the language you want to use.

For spanish, these are:
spanish, sp, es, es_ES, es_ES.ISO_8859-1, es_ES.ISO8859-1, es-ES

So please talk to your sysadmin and ask him to install one of those locales properly, then all should work!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

My webserver is Windows XP and the "Locale" are "spanish".

When I change the language for the blog in Serendipity Administration Suite -> Personal Settings -> Language the calendar works fine in all languajes (but not in spanish).

Examples:
English -> Saturday, December 10. 2005
French -> Samedi, 10 d飥mbre 2005
German -> Samstag, 10. Dezember 2005
Italian -> Sabato, 10 dicembre 2005
Spanish -> Laup䥶, 10 de detsember del 2005 (wrong!!, correct is: 'Sábado, 10 de diciembre de 2005')

*All this probes are maden with the Windows' Locale = "spanish".

Have you another solution? :?

Thanks again!!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

This might be a problem of your PHP installation, whci may not correctly get the locale.

Sadly I have no Windows experience with locales, so I cannot help you on that issue...the only thing I can tell you is that the "LOCALES" within the lang/serendipity_lang_es.inc.php file is the constant that defines which language prints the calendar. If it doesn'T work, the locale is wrong or not working on your system...

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply