Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • smartvisie Friend
    #119727

    I want to use this template in Dutch. Is it possible to change the date format?

    nathanbohn Friend
    #218196

    Use this as a guide and change the locale settings.
    http://www.joomlart.com/forums/topic/changing-the-date/

    avinette Friend
    #218554

    You can use this code if your host has not installed your locale or if you can’t figure it out! Just change the days and month names (I have them here in french) to whatever you need. You cous also add support for more languages in the if / else ladder if needed. I have also changed the order from month/day to day/month for french.

    edit template-name/index.php

    <div class=”ja-day”>
    <?php
    if ( $GLOBALS[‘mosConfig_lang’] == french ) {
    $jour[“Monday”] = “Lundi”;
    $jour[“Tuesday”] = “Mardi”;
    $jour[“Wednesday”] = “Mercredi”;
    $jour[“Thursday”] = “Jeudi”;
    $jour[“Friday”] = “Vendredi”;
    $jour[“Saturday”] = “Samedi”;
    $jour[“Sunday”] = “Dimanche”;

    $mois[“January”] = “Janvier”;
    $mois[“Febrary”] = “Février”;
    $mois[“March”] = “Mars”;
    $mois[“April”] = “Avril”;
    $mois[“May”] = “Mai”;
    $mois[“June”] = “Juin”;
    $mois[“July”] = “Juillet”;
    $mois[“August”] = “Août”;
    $mois[“September”] = “Septembre”;
    $mois[“October”] = “Octobre”;
    $mois[“November”] = “Novembre”;
    $mois[“December”] = “Décembre”;

    $month = Date(F);
    $day = Date(l);

    echo “<span>”.$jour[$day].”</span>”;
    echo ” <div>”.date (‘d’).” “.$mois[$month].”</div>”;
    } else {
    echo “<span>”.date (‘l’).”</span>”;
    echo ” <div>”.date (‘F’).” “.date (‘d’).date (‘S’).”</div>”;
    }
    ?>
    </div>

    borisn Friend
    #219114

    Dear avinette!
    I am very grateful to you for your advice!
    This works and for russian date format too.
    Thank You very much again!
    🙂

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

This topic contains 4 replies, has 4 voices, and was last updated by  borisn 17 years, 7 months ago.

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