-
AuthorPosts
-
May 8, 2008 at 1:16 am #248127
HI Guys,
Could you help how to change the time zone?
May Date is 1 day late on my current time zone. GMT+10
Instead of Showing Monday it should be Tuesday.I already change the timezone on admin configutation but nothin changes?
Hope u guys could help??Thanks!
tifa29 Friendtifa29
- Join date:
- April 2007
- Posts:
- 31
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 4
- Thanked:
- 5 times in 2 posts
May 8, 2008 at 2:10 am #248131<em>@Kim8589 50876 wrote:</em><blockquote>Hello Community,
cam someone explain me, how can i translate the days in the login form, like monday etc. into my speach?
*greets* Kim</blockquote>
I do it like this:
Global configuration -> Locale -> Country Locale: bs_BA.ISO8859-2 (for Bosnian language). It works fine. 🙂
Some samples:
Slovenian: sl_SI.ISO8859-2
Slovak: sk_SK.ISO8859-2
Italian: it_IT.ISO8859-1May 8, 2008 at 4:02 am #248142I did that too. but its not working for me.
Thanks anyways!Maybe there’s a way to incode this manually?
Guys any help?Thanks!!
VisiGod FriendVisiGod
- Join date:
- January 2006
- Posts:
- 538
- Downloads:
- 0
- Uploads:
- 4
- Thanks:
- 76
- Thanked:
- 138 times in 18 posts
May 8, 2008 at 8:35 am #248172It is very sad, that the template doesn’t use the locale from the language file. Because if you run a multilanguage web site, none of the solutions above will work.
felsimedia Friendfelsimedia
- Join date:
- April 2008
- Posts:
- 84
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 4
- Thanked:
- 9 times in 1 posts
May 9, 2008 at 5:47 pm #248390Italian:
<div class=”ja-day”>
<?php
$day = date(“l”);
$daynum = date(“j”);
$month = date(“M”);
$year = date(“Y”);switch($day)
{
case “Monday”: $day = “Lunedi”; break;
case “Tuesday”: $day = “Martedi”; break;
case “Wednesday”: $day = “Mercoledi”; break;
case “Thursday”: $day = “Giovedi”; break;
case “Friday”: $day = “Venerdi”; break;
case “Saturday”: $day = “Sabato”; break;
case “Sunday”: $day = “Domenica”; break;
default: $day = “Ignoto”; break;
}switch($month)
{
case “January”: $month = “Gennaio”; break;
case “February”: $month = “Febbraio”; break;
case “March”: $month = “Marzo”; break;
case “April”: $month = “Aprile”; break;
case “May”: $month = “Maggio”; break;
case “June”: $month = “Guigno”; break;
case “July”: $month = “Luglio”; break;
case “August”: $month = “Agosto”; break;
case “September”: $month = “Settembre”; break;
case “October”: $month = “Ottobre”; break;
case “November”: $month = “Novembre”; break;
case “December”: $month = “Dicembre”; break;
default: $month = “Ignoto”; break;
}echo $day . “, ” . $daynum . “. ” . $month . ” ” . $year;
?>
</div>murrtex Friendmurrtex
- Join date:
- January 2007
- Posts:
- 17
- Downloads:
- 0
- Uploads:
- 4
- Thanked:
- 3 times in 1 posts
May 13, 2008 at 7:53 pm #249005Try This 😉
<?php
echo "<span>".(strftime("%B", time() + ($mosConfig_offset * 60 * 60)))."</span>";
echo " <div>".(strftime("%d", time() + ($mosConfig_offset * 60 * 60)))." ".(strftime("%Y", time() + ($mosConfig_offset * 60 * 60)))."</div>";
?></div>
ruigato Friendruigato
- Join date:
- January 2006
- Posts:
- 74
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 48
- Thanked:
- 1 times in 1 posts
May 16, 2008 at 12:37 am #249324the template should use local settings…
swhel Friendswhel
- Join date:
- November 2007
- Posts:
- 40
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 6
- Thanked:
- 1 times in 1 posts
June 3, 2008 at 8:39 am #251681Nice buth i dont geth right month only default. How can i fix this.. http://www.kollon.se changed default to mÃ¥nad…..
PGLion FriendPGLion
- Join date:
- March 2006
- Posts:
- 107
- Downloads:
- 0
- Uploads:
- 17
- Thanks:
- 8
- Thanked:
- 7 times in 1 posts
June 3, 2008 at 8:41 am #251685I am not sure why this month is not showing properly, I have the same problem. I changed the default name into June, now it’s working, at least this month 🙂
June 9, 2008 at 7:35 pm #252791And here the code for the turkish language:
<div class="ja-day">
<?php
$day = date("l");
$daynum = date("j");
$month = date("M");
$year = date("Y");switch($day)
{
case "Monday": $day = "Pazartesi"; break;
case "Tuesday": $day = "Salı"; break;
case "Wednesday": $day = "Çarşamba"; break;
case "Thursday": $day = "PerÅŸembe"; break;
case "Friday": $day = "Cuma"; break;
case "Saturday": $day = "Cumartesi"; break;
case "Sunday": $day = "Pazar"; break;
default: $day = "Onbekend"; break;
}switch($month)
{
case "January": $month = "Ocak"; break;
case "February": $month = "Åžubat"; break;
case "March": $month = "Mart"; break;
case "April": $month = "Nisan"; break;
case "May": $month = "Mayıs"; break;
case "June": $month = "Haziran"; break;
case "July": $month = "Temmuz"; break;
case "August": $month = "AÄŸustos"; break;
case "September": $month = "Eylül"; break;
case "October": $month = "Ekim"; break;
case "November": $month = "Kasım"; break;
case "December": $month = "Aralık"; break;
default: $month = "Onbekend"; break;
}echo $day . ", " . $daynum . ". " . $month . " " . $year;
?>
</div>VisiGod FriendVisiGod
- Join date:
- January 2006
- Posts:
- 538
- Downloads:
- 0
- Uploads:
- 4
- Thanks:
- 76
- Thanked:
- 138 times in 18 posts
June 14, 2008 at 9:16 pm #253572Well, after JA seems to not be interested in providing clear coding, where such issues would not appear. I found a pretty easier solution that works with any language and is much better, especially on multilanguage sites:
http://www.joomlart.com/forums/topic/solution-date-translation-the-better-way/June 19, 2008 at 6:41 am #254566As with another user’s post, my time zone is set correctly in the global config, but is wrong on the website. It doesn’t show time at all! But the date is wrong, because the time zone of the server is hours different from the locale of the visitors.
How to make it show the time also?
gaygiorgia Friendgaygiorgia
- Join date:
- June 2008
- Posts:
- 218
- Downloads:
- 0
- Uploads:
- 7
- Thanks:
- 15
- Thanked:
- 15 times in 1 posts
June 19, 2008 at 8:36 am #254607If someone who is not a coder want to customize format of date in his own site, here some tips/explanations:
1) PHP DATE FUNCTION GENERAL RULES – date ( string $format [, int $timestamp ] )
—> http://it.php.net/manual/en/function.date.php2) SHOWING OUTPUT IN YOUR WEBSITE:
echo "<span>".phpvariable or date('value')."</span>";
—> show phpvariable or date(‘value’) with ja-day span specific format.
echo "<div>".phpvariable or date('value')."</div>
—> show phpvariable or date(‘value’) with ja-day div specific format.3) EXAMPLE CODE (USING CSS format 😎 ):
so this is an example (WARNING-> my month imput is different, it’s only 3 first letters):<div class=”ja-day”>
<?php
$day = date(“l”);
$month = date(“M”);
//* we do not really need $daynum and $year*. Watch link above at 1) point. *//switch($day)
{
case “Monday”: $day = “Lunedì”; break;
case “Tuesday”: $day = “Martedì”; break;
case “Wednesday”: $day = “Mercoledì”; break;
case “Thursday”: $day = “Giovedì”; break;
case “Friday”: $day = “Venerdì”; break;
case “Saturday”: $day = “Sabato”; break;
case “Sunday”: $day = “Domenica”; break;
default: $day = “Ignoto”; break;
}switch($month)
{
case “Jan”: $month = “Gennaio”; break;
case “Feb”: $month = “Febbraio”; break;
case “Mar”: $month = “Marzo”; break;
case “Apr”: $month = “Aprile”; break;
case “May”: $month = “Maggio”; break;
case “Jun”: $month = “Giugno”; break;
case “Jul”: $month = “Luglio”; break;
case “Aug”: $month = “Agosto”; break;
case “Sep”: $month = “Settembre”; break;
case “Oct”: $month = “Ottobre”; break;
case “Novr”: $month = “Novembre”; break;
case “Dec”: $month = “Dicembre”; break;
default: $month = “Ignoto”; break;
}
echo “<span>”.$day.”</span>”;
echo ” <div>”.date(‘j’).” “.$month.”</div>”; //* to change font, color, ecc… you have to modify templates/ja_teline_ii/css/template.css -> ja-day *//
echo ” <span>”.date (‘Y’).”</span>”;
?>
</div>June 19, 2008 at 2:30 pm #254682Arabic
<div class="ja-day">
<?php
$day = date("l");
$daynum = date("j");
$month = date("M");
$year = date("Y");switch($day)
{
case "Monday": $day = "الأثنين"; break;
case "Tuesday": $day = "الثلاثاء"; break;
case "Wednesday": $day = "الأربعاء"; break;
case "Thursday": $day = "الخميس"; break;
case "Friday": $day = "الجمعه"; break;
case "Saturday": $day = "السبت"; break;
case "Sunday": $day = "الأØد"; break;
default: $day = "اليوم"; break;
}switch($month)
{
case "January": $month = "شهر 1"; break;
case "February": $month = "شهر 2"; break;
case "March": $month = "شهر 3"; break;
case "April": $month = "شهر 4"; break;
case "May": $month = "شهر 5"; break;
case "June": $month = "شهر 6"; break;
case "July": $month = "شهر 7"; break;
case "August": $month = "شهر 8"; break;
case "September": $month = "شهر 9"; break;
case "October": $month = "شهر 10"; break;
case "November": $month = "شهر 11"; break;
case "December": $month = "شهر 12"; break;
default: $month = "شهر"; break;
}echo $day . " " . $daynum . " " . $month . " " . $year;
?>
</div>June 19, 2008 at 6:15 pm #254747<em>@murrtex 53283 wrote:</em><blockquote>Try This 😉
<?php
echo "<span>".(strftime("%B", time() + ($mosConfig_offset * 60 * 60)))."</span>";
echo " <div>".(strftime("%d", time() + ($mosConfig_offset * 60 * 60)))." ".(strftime("%Y", time() + ($mosConfig_offset * 60 * 60)))."</div>";
?></div>
</blockquote>Where does this go? What is the output?
Thanks!
-
AuthorPosts
This topic contains 91 replies, has 47 voices, and was last updated by juremmm 14 years, 5 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum