rioaxaca
Jr. Member
Offline
Posts: 3
|
|
« on: 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,
|
|
|
Logged
|
|
|
|
mikek
|
|
« Reply #1 on: 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");
?>
|
|
|
Logged
|
Mike Knott ------------ Shape 5 Team - Need a great host for your website? We highly recommend siteground.com!
- Put your trust in the hands of our extremely qualified staff to get your job done right! - Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:Install Firebug
|
|
|
rioaxaca
Jr. Member
Offline
Posts: 3
|
|
« Reply #2 on: 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.
|
|
|
Logged
|
|
|
|
dcjunior
Jr. Member
Offline
Posts: 11
|
|
« Reply #3 on: 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.
|
|
|
Logged
|
|
|
|
dcjunior
Jr. Member
Offline
Posts: 11
|
|
« Reply #4 on: August 16, 2011, 11:13:50 AM » |
|
Any help?
|
|
|
Logged
|
|
|
|
mikek
|
|
« Reply #5 on: 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.
|
|
|
Logged
|
Mike Knott ------------ Shape 5 Team - Need a great host for your website? We highly recommend siteground.com!
- Put your trust in the hands of our extremely qualified staff to get your job done right! - Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:Install Firebug
|
|
|
dcjunior
Jr. Member
Offline
Posts: 11
|
|
« Reply #6 on: August 16, 2011, 12:13:50 PM » |
|
Hi.... sorry for the old post. Site: http://www.vvronline.comUser name and passowrd I send for PM.
|
|
|
Logged
|
|
|
|
mikek
|
|
« Reply #7 on: 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
|
|
|
Logged
|
Mike Knott ------------ Shape 5 Team - Need a great host for your website? We highly recommend siteground.com!
- Put your trust in the hands of our extremely qualified staff to get your job done right! - Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:Install Firebug
|
|
|
dcjunior
Jr. Member
Offline
Posts: 11
|
|
« Reply #8 on: 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.
|
|
|
Logged
|
|
|
|
|