Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spanish date
#1
Hello!!

This is not a problem, but did not know where to put the post.

Is it possible to save the date of the page xml in spanish?.

In the web appears: "Publicado el January 17th, 2010". I want that it appears in spanish if it is possible.

I have been looking for ways to save it, but i have not found it.

Regards and thanks.
Reply
#2
I believe GetSimple gets the date straight from your server. So you will have to tell your server to give back Spanish dates.

You can set the default language PHP returns its values in using setlocale().
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#3
I did not know it.

I have changed in /etc/php5/apache2/php.ini, the date.timezone= "Europe/Madrid", but continuous with the same.

Do you know what must be changed?

Thanks.
Reply
#4
You need to change the default language of the server. You only changed the timezone which just changes the time printed out.

Or, you could create an array for the time to convert it to Spanish when printed.
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#5
Thanks internet54, but i do not find the way of changing the default language to the server apache.

I´m thinking in the array, but i have a little experience in this themes. I´ll try it.

REgards.
Reply
#6
Or you use setlocale() as I mentioned …

Example:
Code:
setlocale(LC_ALL, 'nl_NL');
Will make all PHP output be Dutch. You just have to find and put in the language code for Spanish.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#7
es_MX, es_ES
http://nijikokun.com
random stuff. idk.
Reply
#8
Yes Zegnåt. i have tried it too, but the result is the same.
I have created a php and several tests, and always the result is in english (:.

Code:
<?php

$Fecha_num="2007-08-12";

/* Windows con apache
setlocale(LC_TIME, 'Spanish'); */

/* Apache con linux */
/* setlocale(LC_TIME, 'es_ES'); */


// setlocale(LC_TIME, 'de_DE');
// echo strftime('%A, %d. %B %Y');  


/* setlocale(LC_TIME, 'es_MX'); */

setlocale(LC_TIME, 'es_ES');
echo $fecha=strftime('%d %B %Y',strtotime($Fecha_num));

?>

Regards

Edit: i have installed apache2-mpm-prefork
Reply
#9
Take a look at this and it my point you in a simple direction.
http://snipplr.com/view/3644/php--multip...e-spanish/
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#10
Thanks Nijikokun.

Thanks one time more internet54.

This function must be used when the system getsimple saves the date in the page.xml, is this so?.

Regards.
Reply




Users browsing this thread: 1 Guest(s)