| | | |  |  | |  |
31.08.2004, 11:58
|
#1 (permalink)
| | Baby Mamber
Join Date: Aug 2004
Posts: 5
| How do I change the language of the date and time on my site Hi.
I would like to know, how could I change the language of the date and the time on my site.
I have my site in slovenian language, but the time and the date are still in english!!!
Can anybody tell me, how to fix the problem?
If you don't now what I'm talking about, just visit my site at www.iggyweb.biz/mambo .
Thanks a lot.
Igor |
| |
31.08.2004, 12:27
|
#2 (permalink)
| | Baby Mamber
Join Date: Jul 2004
Posts: 4
| Re: How do I change the language of the date and time on my site Hi,
You might find your answer in the language file ie slovenian.php, search for lines like this:
DEFINE("_DATE_FORMAT_LC","%A, %d %B %Y"); //Uses PHP's strftime Command Format
DEFINE("_DATE_FORMAT_LC2","%A, %d %B %Y %H:%M");
The date parameters might not be changed to suite your language.
You will find a good explanation of strftime at this link: http://se.php.net/manual/sv/function.strftime.php
Hope you will find this useful!
/Moose |
| |
31.08.2004, 13:33
|
#3 (permalink)
| | Baby Mamber
Join Date: Apr 2004
Posts: 15
| Re: How do I change the language of the date and time on my site In global configuration, under locale, you have to change country_locale. I dont't know what you have to fill in for Slovenia, but for me (Belgium) it was nl_BE.
You could try something like sl_SL. |
| |
31.08.2004, 16:01
|
#4 (permalink)
| | Baby Mamber
Join Date: Aug 2004
Posts: 5
| Re: How do I change the language of the date and time on my site Thanks a lot all.
I fixed the problem by changing the en_GB to sl_SI for Slovenia.
Again thanks to you all.
Igor |
| |
16.02.2005, 04:52
|
#5 (permalink)
| | Senior Mamber
Join Date: Sep 2004
Posts: 131
| Re: How do I change the language of the date and time on my site Both replies are very interesting and solved my date problens too. To a brazilian portuguese format, is just to use pt_BR.
Thanks a lot people!  |
| |
16.02.2005, 17:28
|
#6 (permalink)
| | Baby Mamber
Join Date: Nov 2004
Posts: 12
| Re: How do I change the language of the date and time on my site It seems very strange to me that things change all the time. In IE I have the correct format (dutch) but when I visit the page with Firefox everything stays in the english format no mater what I try. |
| |
16.02.2005, 17:55
|
#7 (permalink)
| | Baby Mamber
Join Date: Nov 2004
Posts: 12
| Re: How do I change the language of the date and time on my site Thanks to Michael I found a way to do this, it seems to be browser-independant!!
With;
function date_dutch()
{
$mois = array("januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "october", "novembe", "december");
$jours = array("Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag");
return $jours[date("w")]." ".date("j").(date("j") == 1 ? "er" : " "). $mois[date("n")-1]." ".date("Y");
}
print (date_dutch());
?>
Put this in de index.php of the template your using!
I finally found a way to get to correct date and time (even in Firefox)
Bart |
| |
20.02.2005, 22:49
|
#8 (permalink)
| | Baby Mamber
Join Date: Feb 2005
Posts: 3
| Re: How do I change the language of the date and time on my site Quote: |
Originally Posted by divit Thanks to Michael I found a way to do this, it seems to be browser-independant!!
With;
function date_dutch()
{
$mois = array("januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "october", "novembe", "december");
$jours = array("Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag");
return $jours[date("w")]." ".date("j").(date("j") == 1 ? "er" : " "). $mois[date("n")-1]." ".date("Y");
}
print (date_dutch());
?>
Put this in de index.php of the template your using!
I finally found a way to get to correct date and time (even in Firefox)
Bart | Some questions about using this function.
Where in index.php of your template did u put this file? head, body? What did you write in country locale? Where is this function called?
Tnx |
| |
20.02.2005, 22:56
|
#9 (permalink)
| | Baby Mamber
Join Date: Nov 2004
Posts: 12
| Re: How do I change the language of the date and time on my site I've placed on the spot in the template where I want the time and date displayed. The country local doesn't matter anymore because the code that uses this in normal templates is no longer inside the index.php of the template.
Usually something like; <?php echo (strftime ("%A, %d %B %Y", time()+($GLOBALS['mosConfig_offset']*60*60))); ?>
or;
<?php echo mosCurrentDate(); ?>
HTH |
| |
21.02.2005, 00:39
|
#10 (permalink)
| | Baby Mamber
Join Date: Feb 2005
Posts: 3
| Re: How do I change the language of the date and time on my site Quote: |
Originally Posted by divit I've placed on the spot in the template where I want the time and date displayed. The country local doesn't matter anymore because the code that uses this in normal templates is no longer inside the index.php of the template.
Usually something like; <?php echo (strftime ("%A, %d %B %Y", time()+($GLOBALS['mosConfig_offset']*60*60))); ?>
or;
<?php echo mosCurrentDate(); ?>
HTH | oh... I wanted to use thins function to show properly the date at news, not to put it on the page  |
| | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT +2. The time now is 06:16. | | | |