Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • josehenriquesnet Friend
    #157234

    Hello:

    How can I translate the date and in the month, instead of number, put DEC | JAN | FEB….

    Thanks

    Saguaros Moderator
    #365868

    you open the file: templatesja_teline_ivblockstopbar.php and find:
    [PHP]
    <?php
    echo “<span class=”day”>”.date (‘D’).”</span>”;
    echo “<span class=”month”>”.date (‘m’).”</span>”;
    echo “<span class=”date”>”.date (‘d’).”</span>”;
    echo “<span class=”year”>”.date (‘Y’).”</span>”;
    ?>
    [/PHP]
    replace:
    [PHP]
    <?php
    echo “<span class=”day”>”.date (‘D’).”</span>”;
    echo “<span class=”month”>”.date (‘M’).”</span>”;
    echo “<span class=”date”>”.date (‘D’).”</span>”;
    echo “<span class=”year”>”.date (‘Y’).”</span>”;
    ?>
    [/PHP]

    VisiGod Friend
    #365934

    <em>@josehenriquesnet 207413 wrote:</em><blockquote>Hello:

    How can I translate the date and in the month, instead of number, put DEC | JAN | FEB….

    Thanks</blockquote>

    See this:
    http://www.joomlart.com/forums/topic/suggestions-to-joomlart/
    It might not be 1:1, but the logic is the same.

    josehenriquesnet Friend
    #366030

    Still not working 🙁

    VisiGod Friend
    #366048

    <em>@josehenriquesnet 207620 wrote:</em><blockquote>Still not working :(</blockquote>

    which advise did you use?

    zorroh Friend
    #366051

    i did this way..

    before:

    <?php

    echo "<span class="day">".date ('D')."</span>";

    echo "<span class="month">".date ('m')."</span>";

    echo "<span class="date">".date ('d')."</span>";

    echo "<span class="year">".date ('Y')."</span>";

    ?>

    after:

    <?php
    $app =& JFactory::getApplication();
    $date = JFactory::getDate();
    $date->setOffset($app->getCfg('offset'));
    echo $date->toFormat('<span class="day">%D</span><span class="date">%d</span><span class="month">%m</span><span class="year">%Y</span></span>');
    ?>

    now when i go with mouse to year, then day name not shown?? what i did wrong? (in our country i need day, month, year format)


    1. date-teline4
    Saguaros Moderator
    #366078

    <em>@josehenriquesnet 207620 wrote:</em><blockquote>Still not working :(</blockquote>

    If think that you should provide us snapshot with your illustrations defining your requirement. I can then give you the solution.

    VisiGod Friend
    #366151

    Can you try with:


    <?php
    $app =& JFactory::getApplication();
    $date = JFactory::getDate();
    $date->setOffset($app->getCfg('offset'));
    echo $date->toFormat('<span class="day">%a</span><span class="date">%d</span><span class="month">%m</span><span class="year">%Y</span></span>');
    ?>

    zorroh Friend
    #366175

    juhhuuu, your are the Man! 🙂 thats working! 🙂

    VisiGod Friend
    #366176

    <em>@zorroh 207794 wrote:</em><blockquote>juhhuuu, your are the Man! 🙂 thats working! :)</blockquote>

    Welcome 🙂
    I just hope JA implements the translation and time offset in the template itself

    zorroh Friend
    #366183

    yep, i hope that too!

    an2803 Friend
    #366244

    <em>@josehenriquesnet 207413 wrote:</em><blockquote>Hello:

    How can I translate the date and in the month, instead of number, put DEC | JAN | FEB….

    Thanks</blockquote>
    Open the file: templatesja_teline_ivblockstopbar.php and find:

    [PHP] <?php
    echo “<span class=”day”>”.date (‘D’).”</span>”;
    echo “<span class=”month”>”.date (‘m’).”</span>”;
    echo “<span class=”date”>”.date (‘d’).”</span>”;
    echo “<span class=”year”>”.date (‘Y’).”</span>”;
    ?>[/PHP]
    and replace with this code:
    [PHP]<?php
    $month = date(“m”);
    switch($month)
    {
    case “1”: $month = “Jan”; break;
    case “2”: $month = “Feb”; break;
    case “3”: $month = “Mar”; break;
    case “4”: $month = “Apr”; break;
    case “5”: $month = “May”; break;
    case “6”: $month = “Jun”; break;
    case “7”: $month = “Jul”; break;
    case “8”: $month = “Aug”; break;
    case “9”: $month = “Sep”; break;
    case “10”: $month = “Oct”; break;
    case “11”: $month = “Nov”; break;
    case “12”: $month = “Dec”; break;
    }
    echo “<span class=”day”>”.date(“D”).”</span>”;
    echo “<span class=”date”>”.date (‘d’).”</span>”;
    echo “<span class=”month”>”.$month.”</span>”;
    echo “<span class=”year”>”.date (‘Y’).”</span>”;[/PHP]
    This is result:


    1. 12-11-2010-10-18-22-AM
    VisiGod Friend
    #366317

    Come on, stop spreading this solution. It is a bad one, as it totally ignores the time offsetting and doesn’t work on multilingual sites.

Viewing 13 posts - 1 through 13 (of 13 total)

This topic contains 13 replies, has 5 voices, and was last updated by  VisiGod 13 years, 5 months ago.

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