test
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • ambiental Friend
    #159654

    Hello Teline Fans,

    I’m using Teline IV J1.6 and the nice date layout in topbar is locked in english and may be a problem for other language users, because the layout may be different (d/m/y) and the day text is obvious different.

    Here’s my contribution!

    Open in your favorite editor the file templates/ja_teline_iv/blocks/topbar.php and look in the first lines

    Original Code
    [PHP] <p class=”ja-day clearfix”>
    <?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>”;
    ?>
    </p>[/PHP]

    New Code
    [PHP] <p class=”ja-day clearfix”>
    <?php
    setlocale(LC_TIME, ‘pt_BR’);
    echo “<span class=”day”>”.strftime(‘%a’).”</span>”;
    echo “<span class=”date”>”.strftime(‘%d’).”</span>”;
    echo “<span class=”month”>”.strftime(‘%m’).”</span>”;
    echo “<span class=”year”>”.strftime(‘%Y’).”</span>”;
    ?>
    </p>[/PHP]

    Don’t use LC_ALL and look for your prefix languages, “pt_BR” is my need (Brazilian Portuguese). More settings in the PHP Help:

    http://php.net/manual/en/function.setlocale.php
    http://php.net/manual/en/function.strftime.php

    Saludos!

    Haldor Omar

    actu9 Friend
    #375285

    Thanks Haldor, very helpful 😉

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

This topic contains 2 replies, has 2 voices, and was last updated by  actu9 13 years, 10 months ago.

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