Forum Support

Shape 5
October 25, 2021, 05:53:28 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Shape 5 Forum
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: A want to change the languaje of the date  (Read 564 times)
rioaxaca
Jr. Member
**
Offline 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
Administrator
*****
Offline Offline

Posts: 28743



WWW
« 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 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 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 Offline

Posts: 11



« Reply #4 on: August 16, 2011, 11:13:50 AM »

Any help?
Logged
mikek
Administrator
*****
Offline Offline

Posts: 28743



WWW
« 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 Offline

Posts: 11



« Reply #6 on: 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.
Logged
mikek
Administrator
*****
Offline Offline

Posts: 28743



WWW
« 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 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
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Looking for the largest variety in template designs? Look no more. Never buy 1 theme again. Signups start at just $89 for access to all of our themes.
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.