Members: 16,996
Threads: 38,846
Posts: 159,391
Online: 18

Newest Member: Kl_broka@rediffmail.com


Odoo.tv - Outdoor Television


Sedo - Domains kaufen und verkaufen das Projekt mambers.com steht zum Verkauf Besucherstatistiken von mambers.com etracker® Web-Controlling statt Logfile-Analyse

Go Back   Mambers.com > Archive > Mambo 4.5 > Mambo 4.5 'How Do I' Questions

 
 
LinkBack Thread Tools Display Modes
Old 31.08.2004, 11:58   #1 (permalink)
Baby Mamber
 
Join Date: Aug 2004
Posts: 5
igorlebar is on a distinguished road
Default 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
igorlebar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Old 31.08.2004, 12:27   #2 (permalink)
Baby Mamber
 
Join Date: Jul 2004
Posts: 4
Moose is on a distinguished road
Default 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
Moose is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 31.08.2004, 13:33   #3 (permalink)
Baby Mamber
 
Join Date: Apr 2004
Posts: 15
bunwa is on a distinguished road
Default 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.
bunwa is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 31.08.2004, 16:01   #4 (permalink)
Baby Mamber
 
Join Date: Aug 2004
Posts: 5
igorlebar is on a distinguished road
Default 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
igorlebar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 16.02.2005, 04:52   #5 (permalink)
Senior Mamber
 
ehsabbi's Avatar
 
Join Date: Sep 2004
Posts: 131
ehsabbi is on a distinguished road
Default 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!
ehsabbi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 16.02.2005, 17:28   #6 (permalink)
Baby Mamber
 
Join Date: Nov 2004
Posts: 12
divit is on a distinguished road
Default 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.
divit is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 16.02.2005, 17:55   #7 (permalink)
Baby Mamber
 
Join Date: Nov 2004
Posts: 12
divit is on a distinguished road
Default 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
divit is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 20.02.2005, 22:49   #8 (permalink)
Baby Mamber
 
Join Date: Feb 2005
Posts: 3
Andro_ is on a distinguished road
Default 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
Andro_ is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 20.02.2005, 22:56   #9 (permalink)
Baby Mamber
 
Join Date: Nov 2004
Posts: 12
divit is on a distinguished road
Default 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
divit is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 21.02.2005, 00:39   #10 (permalink)
Baby Mamber
 
Join Date: Feb 2005
Posts: 3
Andro_ is on a distinguished road
Default 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
Andro_ is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
component for registration lists misapma Component Development 3 03.07.2004 16:52
Problem whit date and time on first page Fly-Ivan Mambo 4.5 Installation and Upgrades 9 03.06.2004 12:17


All times are GMT +2. The time now is 06:16.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.