Shape 5

Joomla Templates => Sportopolis - Club => : rioaxaca July 15, 2009, 12:41:56 PM



: A want to change the languaje of the date
: rioaxaca July 15, 2009, 12:41:56 PM
I have a sportopolis template, and i want to change the languaje of the date to spanish, how i can do this?.

Thank you,


: Re: A want to change the languaje of the date
: mikek July 16, 2009, 08:18:28 AM
Hi, it's a little tricky to get it to work right because of special characters in other languages. The date() function in php by default takes on the language of the server. If you edit the template's index.php file and look for:

<?php $today = date("l, F j, Y"); PRINT "$today";?>

replace it with:

<?php

setlocale(LC_ALL, 'es-es');

echo strftime("%A, %B %e, %Y");

?>


: Re: A want to change the languaje of the date
: rioaxaca July 16, 2009, 09:51:05 AM
Thank you, 

I done the change and this is fine. Now my site is showing the date on spanish.



: Re: A want to change the languaje of the date
: dcjunior August 15, 2011, 07:19:16 AM
Hi, I made this change on my site did not work.

My site is Jooma 1.7 and my language is pt-BR.


: Re: A want to change the languaje of the date
: dcjunior August 16, 2011, 11:13:50 AM
Any help?


: Re: A want to change the languaje of the date
: mikek August 16, 2011, 11:15:13 AM
Hello,

Your post was overlooked. Please be sure to open a new topic for new questions so they are not overlooked.

The post above should work. If not, please post a url to your site so I can see the code live.


: Re: A want to change the languaje of the date
: dcjunior August 16, 2011, 12:13:50 PM
Hi.... sorry for the old post.

Site: http://www.vvronline.com

User name and passowrd I send for PM.


: Re: A want to change the languaje of the date
: mikek August 16, 2011, 02:17:20 PM
Hello,

It is currently showing in a different language:

        Tuesday, 16 de August de 2011                       

English would be:

Tuesday, 16 August 2011


: Re: A want to change the languaje of the date
: dcjunior August 16, 2011, 02:58:49 PM
I just changed the order of the following fields:

?
<php setlocale (LC_ALL, 'es-es');
echo strftime ("% A,% e% B,% Y");
?>

to

?
<php setlocale (LC_ALL, 'pt-br');
("% A,% B de % e de % Y");
?>

But keeping it as you originally posted, nothing changes. Continues in English, when I want to in Portuguese  br.

In Joomla 1.5 of template your code worked. How did the upgrade to 1.7 and repeat the same change did not work anymore.