Viewing 15 posts - 1 through 15 (of 61 total)
  • Author
    Posts
  • ciancitto Friend
    #144158

    Hi, i just want to know how can i modify the date in italian language and also for disability last update.

    I also see that i can’t customize the html template ‘cos i’ve only this code:

    <?php
    /**
    * @copyright Copyright (C) 2005 – 2007 Open Source Matters. All rights reserved.
    * @license GNU/GPL, see LICENSE.php
    * Joomla! is free software. This version may have been modified pursuant
    * to the GNU General Public License, and as distributed it includes or
    * is derivative of works licensed under the GNU General Public License or
    * other free or open source software licenses.
    * See COPYRIGHT.php for copyright notices and details.
    */

    // no direct access
    defined( ‘_JEXEC’ ) or die( ‘Restricted access’ );

    include_once (dirname(__FILE__).DS.’libs’.DS.’ja.template.helper.php’);

    $tmplTools = JATemplateHelper::getInstance($this, array(‘ui’));

    # Auto Collapse Divs Functions ##########
    $ja_left = $this->countModules(‘left’) || ($tmplTools->getParam(JA_TOOL_MENU) == 1);
    $ja_right = $this->countModules(‘right’);

    if ( $ja_left && $ja_right ) {
    $divid = ”;
    } elseif ( $ja_left ) {
    $divid = ‘-fr’;
    } elseif ( $ja_right ) {
    $divid = ‘-fl’;
    } else {
    $divid = ‘-f’;
    }
    $tmplTools->setParam (‘divid’, $divid);

    $curidx = $tmplTools->getCurrentMenuIndex();
    //if ($curidx) $curidx–;

    //Calculate the width of template
    $tmplWidth = ”;
    $tmplWrapMin = ‘100%’;
    switch ($tmplTools->getParam(JA_TOOL_SCREEN)){
    case ‘auto’:
    $tmplWidth = ‘97%’;
    break;
    case ‘fluid’:
    $tmplWidth = intval($tmplTools->getParam(‘ja_screen_width’));
    $tmplWidth = $tmplWidth ? $tmplWidth.’%’ : ‘90%’;
    break;
    case ‘fix’:
    $tmplWidth = intval($tmplTools->getParam(‘ja_screen_width’));
    $tmplWrapMin = $tmplWidth ? ($tmplWidth+1).’px’ : ‘751px’;
    $tmplWidth = $tmplWidth ? $tmplWidth.’px’ : ‘750px’;
    break;
    default:
    $tmplWidth = intval($tmplTools->getParam(JA_TOOL_SCREEN));
    $tmplWrapMin = $tmplWidth ? ($tmplWidth+1).’px’ : ‘751px’;
    $tmplWidth = $tmplWidth ? $tmplWidth.’px’ : ‘750px’;
    break;
    }

    $tmplTools->setParam (‘tmplWidth’, $tmplWidth);
    $tmplTools->setParam (‘tmplWrapMin’, $tmplWrapMin);

    //Main navigation
    $ja_menutype = $tmplTools->getParam(JA_TOOL_MENU);
    $jamenu = null;
    if ($ja_menutype != ‘none’) {
    $japarams = new JParameter(”);
    $japarams->set( ‘menutype’, $tmplTools->getParam(‘menutype’, ‘mainmenu’) );
    $japarams->set( ‘menu_images_align’, ‘left’ );
    $japarams->set( ‘menupath’, $tmplTools->templateurl() .’/ja_menus’);
    $japarams->set(‘menu_title’, 0);

    $tmplTools->loadMenu($japarams);
    }

    //End for main navigation

    $layout = $tmplTools->getLayout ();
    if ($layout) {
    $tmplTools->display ($layout);
    }

    ————————-

    I think that is missing something….

    Can you help me ?

    Many thanks !:)

    zipper Friend
    #317218

    I have changed the date to dutch, you can use this also for Italian. I think you mean the date in the top header?

    Go to templatesja_teline_iiilayoutsblocksheader.php

    Search for:

    <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 change to this:

    <p class="ja-day">

    <?php
    $datum = date("j F Y");
    $dagvanweek = date("l");
    $arraydag = array(
    "Domenica",
    "Lunedi",
    "Martedi",
    "Mercoledì",
    "Giovedi",
    "Venerdi",
    "Sabato"
    );
    $dagvanweek = $arraydag;
    $arraymaand = array(
    "Gennaio",
    "Febbraio",
    "Marzo",
    "Aprile",
    "Maggio",
    "Giugno",
    "Luglio",
    "Agosto",
    "Settembre",
    "Ottobre",
    "Novembre",
    "Dicembre"
    );
    $datum = date("j ") . $arraymaand
    . date(" Y");
    echo "$dagvanweek, $datum";
    ?>
    </p>

    Too disable lastupdate, pull this line out:

    <p class="ja-updatetime"><span>Last update:</span><em><?php echo JATemplateHelper::getLastUpdate(); ?></em></p>

    I changed the day format for you too Italian.. hope that this helps you out.

    ciancitto Friend
    #317224

    Ok, i try it.
    Many thanks for your fast help !

    santoshalom Friend
    #317488

    thank you zipper for the helpful tip

    igmar Friend
    #318396

    Hi,

    Thank you for the code, very helpful.

    However, I’ve changed our one to Afrikaans but on Thursday the 24/09 it showed Friday.

    Here is the code and any help appreciated.

    <?php
    $datum = date(“j F Y”);
    $dagvanweek = date(“l”);
    $arraydag = array(
    “Maandag”,
    “Dinsdag”,
    “Woensdag”,
    “Donderdag”,
    “Vrydag”,
    “Saterdag”,
    “Sondag”
    );
    $dagvanweek = $arraydag;
    $arraymaand = array(
    “Januarie”,
    “Februarie”,
    “Maart”,
    “April”,
    “Mei”,
    “Junie”,
    “Julie”,
    “Augustus”,
    “September”,
    “Oktober”,
    “November”,
    “Desember”
    );
    $datum = date(“j “) . $arraymaand
    . date(” Y”);
    echo “$dagvanweek, $datum”;
    ?>
    </p>

    hariorama Friend
    #318398

    german version:

    <?php
    $day = date(“l”);
    $daynum = date(“j”);
    $month = date(“M”);
    $year = date(“Y”);

    switch($day)
    {
    case “Monday”: $day = “Montag”; break;
    case “Tuesday”: $day = “Dienstag”; break;
    case “Wednesday”: $day = “Mittwoch”; break;
    case “Thursday”: $day = “Donnerstag”; break;
    case “Friday”: $day = “Freitag”; break;
    case “Saturday”: $day = “Samstag”; break;
    case “Sunday”: $day = “Sonntag”; break;
    }

    switch($month)
    {
    case “January”: $month = “Januar”; break;
    case “February”: $month = “Februar”; break;
    case “March”: $month = “Maerz”; break;
    case “April”: $month = “April”; break;
    case “May”: $month = “Mai”; break;
    case “June”: $month = “Juni”; break;
    case “July”: $month = “Juli”; break;
    case “August”: $month = “August”; break;
    case “September”: $month = “September”; break;
    case “October”: $month = “Oktober”; break;
    case “November”: $month = “November”; break;
    case “December”: $month = “Dezember”; break;
    }

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

    zipper Friend
    #318422

    <em>@igmar 146042 wrote:</em><blockquote>Hi,

    Thank you for the code, very helpful.

    However, I’ve changed our one to Afrikaans but on Thursday the 24/09 it showed Friday.

    Here is the code and any help appreciated.

    <?php
    $datum = date(“j F Y”);
    $dagvanweek = date(“l”);
    $arraydag = array(
    “Sondag”,
    “Maandag”,
    “Dinsdag”,
    “Woensdag”,
    “Donderdag”,
    “Vrydag”,
    “Saterdag”,
    );
    $dagvanweek = $arraydag;
    $arraymaand = array(
    “Januarie”,
    “Februarie”,
    “Maart”,
    “April”,
    “Mei”,
    “Junie”,
    “Julie”,
    “Augustus”,
    “September”,
    “Oktober”,
    “November”,
    “Desember”
    );
    $datum = date(“j “) . $arraymaand
    . date(” Y”);
    echo “$dagvanweek, $datum”;
    ?>
    </p></blockquote>

    Changed the code a little bit, you had Sondag at the end, had to be at the start. Tell me if it worked out ok. Altough Afrikaans almost similar to Dutch, some little things are different regarding the C’s and Z’s.

    igmar Friend
    #318452

    zipper,

    Thank you for the update!

    However, when I changed it to “Sondag” at the top my page failed to load. I only got a blank on my homepage.

    Thank you again and your help is appreciated.

    Schwoelm Friend
    #320395

    Hi,

    thx for your helpfull posts. I tried by myself the following code and it functions well (you have only to change the language-code “de_DE” for your needs and your country):

    <p class="ja-day">
    <?php
    setlocale(LC_TIME, "de_DE");
    echo strftime(" %A, %d. %B %Y n");
    ?>
    </p>

    Hope, its helpfull for u guys.

    Hendrik

    zorroh Friend
    #320484

    wow, thanks man. last one was really helpful!

    gray Friend
    #320681

    <em>@Schwoelm 148676 wrote:</em><blockquote>Hi,

    thx for your helpfull posts. I tried by myself the following code and it functions well (you have only to change the language-code “de_DE” for your needs and your country):

    <p class="ja-day">
    <?php
    setlocale(LC_TIME, "de_DE");
    echo strftime(" %A, %d. %B %Y n");
    ?>
    </p>

    Hope, its helpfull for u guys.

    Hendrik</blockquote>

    It doesn’t work for UTF8 (and probably depends on server). In case of German language, in my case (localhost – Windows NT WS08 5.1 build 2600, MySQL 5.1.33-community,utf8_general_ci, PHP 5.2.9, Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.9), it worked only with “ge”

    But for general purposes, the above code could be enriched.
    [php]
    setlocale(LC_TIME, array(‘de_DE’,’de_DE.UTF8′,’de_DE@euro’, ‘de’, ‘ge’));
    echo strftime(” %A, %d. %B %Y n”);[/php]

    Still, for Cyrillic languages this approach would not work. Personally I stopped at:
    [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]

    Schwoelm Friend
    #320735

    Hi gray,

    thx for your “enriched” code. I´ve tried it now on our servers and it works fine too.

    I wonder, why “my” code should not work with UTF8!? Because all of our sites are in UTF8 and the code works fine…

    But to “get sure” that it works on every server (except cyrillic languages) I would prefer and recommend YOUR enriched code.

    Thx, Hendrik

    shelsoker Friend
    #321505

    Hi, if someone served the Spanish code, here is:

    <?php
    $datum = date(“j F Y”);
    $dagvanweek = date(“l”);
    $arraydag = array(
    “Domingo”,
    “Lunes”,
    “Martes”,
    “Miercoles”,
    “Jueves”,
    “Viernes”,
    “Sabado”
    );
    $dagvanweek = $arraydag;
    $arraymaand = array(
    “Enero”,
    “Febrero”,
    “Marzo”,
    “Abril”,
    “Mayo”,
    “Junio”,
    “Julio”,
    “Agosto”,
    “Septiembre”,
    “Octubre”,
    “Noviembre”,
    “Diciembre”
    );
    $datum = date(“j “) . $arraymaand
    . date(” Y”);
    echo “$dagvanweek, $datum”;
    ?>
    </p>

    kha007 Friend
    #322165

    I want change date in french version. can you help me?

    gray Friend
    #322175

    <em>@kha007 151013 wrote:</em><blockquote>I want change date in french version. can you help me?</blockquote>
    try
    [php]
    setlocale(LC_TIME, array(‘fr_FR’, ‘fr’, ‘fre’, ‘fr_FR.UTF8’));
    echo strftime(” %A, %d. %B %Y n”);
    [/php]

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

This topic contains 61 replies, has 30 voices, and was last updated by  euroadvltd 11 years, 10 months ago.

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