Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • 1numarahost Friend
    #144537

    Hi Guys,

    I’m using Turkish language on the frontpage but the time and date still appears in english? How can I fix that ?

    Thanks.

    Modified:

    Anyone who has this issue, here is the solution (Turkish Language) :

    Find in templatesja_teline_iiilayoutsblocksheader.php this:


    <p class="ja-day">
    <?php
    echo "<span class="day">".date ('l')."</span>";
    echo "<span class="date">, ".date ('M')." ".date ('d').date ('S')."</span>";
    ?>
    </p>

    and replace it with this:


    <p class="ja-day">

    <?php
    $datum = date("j F Y");
    $dagvanweek = date("l");
    $arraydag = array(
    "Pazar",
    "Pazartesi",
    "Sali",
    "Carsamba",
    "Persembe",
    "Cuma",
    "Cumartesi"
    );
    $dagvanweek = $arraydag;
    $arraymaand = array(
    "Ocak",
    "Subat",
    "Mart",
    "Nisan",
    "Mayis",
    "Haziran",
    "Temmuz",
    "Agustos",
    "Eylul",
    "Ekim",
    "Kasim",
    "Aralik"
    );
    $datum = date("j ") . $arraymaand
    . date(" Y");
    echo "$dagvanweek, $datum";
    ?>
    </p>

    Anonymous Moderator
    #318362

    Hi 1numarahost

    Please open templatesja_teline_iiilayoutsblocksheader.php file, find this text to change

    Hope it helps.

    hariorama Friend
    #318365

    thank’s JA Developer

    but it did not really help.

    how can you change the clock to other timezones and language?

    soaresa Friend
    #318429

    I also need to change date and time to Portuguese. In the old Teline II it used to be Ja-day inside of the index.html. I couldn’t find in Teline III. Please help. Thanks.

    1numarahost Friend
    #318431

    <em>@JA Developer 145999 wrote:</em><blockquote>Hi 1numarahost

    Please open templatesja_teline_iiilayoutsblocksheader.php file, find this text to change

    Hope it helps.</blockquote>

    What text I’m lookinf for exactly 🙂

    1numarahost Friend
    #318453

    I solved tha problem and added the “how to” on the firs message.

    soaresa Friend
    #318457

    Here’s for Portuguese:

    <p class=”ja-day”>
    <?php
    $day = date(“l”);
    $daynum = date(“j”);
    $month = date(“M”);
    $year = date(“Y”);

    switch($day)
    {
    case “Monday”: $day = “2ª Feira”; break;
    case “Tuesday”: $day = “3ª Feira”; break;
    case “Wednesday”: $day = “4ª Feira”; break;
    case “Thursday”: $day = “5ª Feira”; break;
    case “Friday”: $day = “6ª Feira”; break;
    case “Saturday”: $day = “Sabado”; break;
    case “Sunday”: $day = “Domingo”; break;
    default: $day = “Onbekend”; break;
    }

    switch($month)
    {
    case “Jan”: $month = “Jan”; break;
    case “Feb”: $month = “Fev”; break;
    case “Mar”: $month = “Mar”; break;
    case “Apr”: $month = “Abr”; break;
    case “May”: $month = “Mai”; break;
    case “Jun”: $month = “Jun”; break;
    case “Jul”: $month = “Jul”; break;
    case “Aug”: $month = “Ago”; break;
    case “Sep”: $month = “Set”; break;
    case “Oct”: $month = “Out”; break;
    case “Nov”: $month = “Nov”; break;
    case “Dec”: $month = “Dez”; break;
    default: $month = “Onbekend”; break;
    }

    echo $day . “, ” . $daynum . ” ” . $month . ” ” . $year;
    ?>
    </p>

    iverjames Friend
    #318818

    is it possible to have the time and date in the frontend change to the what timezone setting on global config?
    my server location is late about 22hours from my location. can someone help me about this? thanks in advance.

    gray Friend
    #320415

    <em>@iverjames 146571 wrote:</em><blockquote>is it possible to have the time and date in the frontend change to the what timezone setting on global config?
    my server location is late about 22hours from my location. can someone help me about this? thanks in advance.</blockquote>

    Here you can find an example of time offset function (function date_at_timezone).

    gray Friend
    #320416

    I propose one more variant – to use lanuage contants. Below is the code:

    [PHP] <p class=”ja-day”>
    <?php
    echo “<span class=”day”>”.JText::_(date (‘l’)).”</span>”;
    echo “<span class=”date”>,”.date (‘d’).’ ‘.JText::_(date (‘F’)).’ ‘.date (‘Y’).”</span>”;
    ?>
    </p>
    [/PHP]

    Of cause, in dependance on a particular country’s “preferences”, format of the output could be changed (ie day before month etc).

    gray Friend
    #320422

    Again me, with one more proposal. There is a great Date & Time module available for Joomla with a lot of features.

    instead of
    [PHP]<p class=”ja-day”>
    <?php
    echo “<span class=”day”>”.date (‘l’).”</span>”;
    echo “<span class=”date”>, “.date (‘M’).” “.date (‘d’).date (‘S’).”</span>”;
    ?>
    </p>[/PHP]

    I’ve put
    [PHP]<?php if($this->countModules(‘time’)) : ?>
    <div class=”ja-day”>
    <jdoc:include type=”modules” name=”time” />
    </div>
    <?php endif; ?>[/PHP]

    then installed the module and assigned it to postion “time”. That’s all!

    There is a “minus” – module is too heavy. As “next” step, just necessary code could be taken form the module and insert directly into the template.

    Hope it helps.

    Schwoelm Friend
    #320608

    Hi to all,

    there´s in an other thread the same discussion. Here is the link to this thread… to my post and hopefully to the easy solution for EVERY country and language:

    http://www.joomlart.com/forums/showpost.php?p=148676&postcount=9

    Yours Hendrik

    zorroh Friend
    #320682

    [PHP]<p class=”ja-day”>
    <?php
    echo “<span class=”day”>”.JText::_(date (‘l’)).”</span>”;
    echo “<span class=”date”>,”.date (‘d’).’ ‘.JText::_(date (‘F’)).’ ‘.date (‘Y’).”</span>”;
    ?>
    </p>[/PHP]

    Thanks gray, its working in my country and in my language.

    treybraid Friend
    #321364

    😀 great post exactly what i was looking for!!!! 😀

    http://66.110.213.15/City/

    brovazzz Friend
    #369574

    Hi guys, I wrote already about my problem in another topic, but still wanna ask it here too. I use russian for my website, but if I change days and months into russian the page shows only symbols :((, what do I have to do to solve the problem???

Viewing 15 posts - 1 through 15 (of 16 total)

This topic contains 16 replies, has 11 voices, and was last updated by  Ninja Lead 13 years, 4 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum