test
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • pluriel72 Friend
    #164369

    Is it possible to change date from English to German? Where can I find it?

    khoand Friend
    #392764

    Hi,
    You replace this code from templatesja_minisiteblocksbreadcrums.php file


    <p class="ja-day">
    <?php
    echo "<span class="day">".date ('D').",</span>";
    echo "<span class="date">".date ('d')."</span>";
    echo "<span class="month">".date ('M')."</span>";
    echo "<span class="year">".date ('Y')."</span>";
    ?>
    </p>

    with


    <p class="ja-day">
    <?php
    echo "<span class="day">".JText::_(date ('D')).",</span>";
    echo "<span class="date">".date ('d')."</span>";
    echo "<span class="month">".JText::_(date ('M'))."</span>";
    echo "<span class="year">".date ('Y')."</span>";
    ?>
    </p>

    – Change this code from c:xampp173xampphtdocsminisite16languageyour_languageyour_language.ini file


    ;Days of the Week
    SAT="Sat"
    SUN="Sun"
    MON="Mon"
    TUE="Tue"
    WED="Wed"
    THU="Thu"
    FRI="Fri"


    ; Months
    JANUARY="January"
    FEBRUARY="February"
    MARCH="March"
    APRIL="April"
    MAY="May"
    JUNE="June"
    JULY="July"
    AUGUST="August"
    SEPTEMBER="September"
    OCTOBER="October"
    NOVEMBER="November"
    DECEMBER="December"

    Carlo B. Dalle Molle Friend
    #393373

    …and for the Italian?
    Thanks

    khoand Friend
    #393386

    It is same. Change c:xampp173xampphtdocsminisite16languageit-ITit-IT.ini file

    Carlo B. Dalle Molle Friend
    #394859

    Hi,
    I tried to change the breadcrums.php and it-IT.ini files but the date is not correct becouse it have this format LUN,06 JUN 2011 (the month is not translate to “GIU”).this is the breadcums.php file:

    <?php
    /*
    # ————————————————————————
    # T3V2 Framework
    # ————————————————————————
    # Copyright (C) 2004-20010 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
    # @license – GNU/GPL, http://www.gnu.org/licenses/gpl.html
    # Author: J.O.O.M Solutions Co., Ltd
    # Websites: http://www.joomlart.comhttp://www.joomlancers.com
    # ————————————————————————
    */
    ?>
    <div class=”ja-breadcrums”>
    <!–strong><?php echo JText::_(‘You are here’)?></strong–> <jdoc:include type=”module” name=”breadcrumbs” />
    </div>

    <p class=”ja-day”>
    <?php
    echo “<span class=”day”>”.JText::_(date (‘D’)).”,</span>”;
    echo “<span class=”date”>”.date (‘d’).”</span>”;
    echo “<span class=”month”>”.JText::_(date (‘M’)).”</span>”;
    echo “<span class=”year”>”.date (‘Y’).”</span>”;
    ?>

    </p>

    and thi is the it-IT.ini file:

    DATE_FORMAT_LC=%A %d %B %Y
    DATE_FORMAT_LC1=%A %d %B %Y
    DATE_FORMAT_LC2=%A %d %B %Y %H:%M
    DATE_FORMAT_LC3=%d %B %Y
    DATE_FORMAT_LC4=%d.%m.%y
    DATE_FORMAT_JS1=y-m-d
    %Y-%M-%D=%Y-%m-%d
    %A, %B %E=%A, %B %e

    # Months

    JANUARY_SHORT=Gen
    JANUARY=Gennaio
    FEBRUARY_SHORT=Feb
    FEBRUARY=Febbraio
    MARCH_SHORT=Mar
    MARCH=Marzo
    APRIL_SHORT=Apr
    APRIL=Aprile
    MAY_SHORT=Mag
    MAY=Maggio
    JUNE_SHORT=Giu
    JUNE=Giugno
    JULY_SHORT=Lug
    JULY=Luglio
    AUGUST_SHORT=Ago
    AUGUST=Agosto
    SEPTEMBER_SHORT=Set
    SEPTEMBER=Settembre
    OCTOBER_SHORT=Ott
    OCTOBER=Ottobre
    NOVEMBER_SHORT=Nov
    NOVEMBER=Novembre
    DECEMBER_SHORT=Dic
    DECEMBER=Dicembre

    <ul class=”no-display”>
    <li><a href=”<?php echo $this->getCurrentURL();?>#ja-content” title=”<?php echo JText::_(“Skip to content”);?>”><?php echo JText::_(“Skip to content”);?></a></li>
    </ul>

    steinar Friend
    #395000

    Ciao templateit,

    You have probably two (or possibly more) language folders with identical content. At least I know I have but i can’t tell whether this is correct or not. It looks rather messy. I have subdomains with even more language folders.

    You may want to check the xx-XX.ini file in these folders:
    ~ >> language
    ~ >> administrator >> language

    Make sure you have the correct translations.
    (xx-XX is the country code, in your case it-IT).

    Good luck!

    ps
    If you prefer the full day and month name as in MARTEDÌ 07 GIUGNO 2011 all you need to do is to use ‘l’ (that’s a small L) instead of ‘D’ in the first line and ‘F’ instead of ‘M’ in the third line of khoand’s example above, like this:

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

    Ivan Friend
    #395925

    If I write the date like this:
    echo “<span class=”day”>”.date (‘H’).”</span>”;
    My time is displayed in a different time zone…

    If I write the date like this:
    echo ‘<span class=”day”>’.JHTML::_(date, now, ‘H, ‘).'</span>’;
    My time is displayed correctly but I get this error:
    Notice: Use of undefined constant date – assumed ‘date’ in /var/www/mihanja80/data/www/albina.biz.ua/templates/ja_minisite/blocks/breadcrums.php on line 19

    Notice: Use of undefined constant now – assumed ‘now’ in /var/www/mihanja80/data/www/albina.biz.ua/templates/ja_minisite/blocks/breadcrums.php on line 19

    Decision:
    echo ‘<span class=”day”>’.JHTML::_(‘date’, ‘now’, (‘H, ‘)).'</span>’;

    [PHP]<p class=”ja-day”>
    <?php
    echo ‘<span class=”day”>’.JHTML::_(‘date’, ‘now’, ‘l, ‘).'</span>’.
    ‘<span class=”date”>’.JHTML::_(‘date’, ‘now’, ‘d ‘).'</span>’.
    ‘<span class=”month””>’.JHTML::_(‘date’, ‘now’, ‘F ‘).'</span>’.
    ‘<span class=”year”>’.JHTML::_(‘date’, ‘now’, ‘Y’).'</span>’;
    ?>
    </p>[/PHP]
    = Неділя, 12 червня 2011
    (In Ukrainian)

    steinar Friend
    #395934

    Hello Biwebco,
    I can’t check it from where I am now, but what happens if you use .JText::_ .date .JText::_ and .date respectively instead of the four times .JHTML::_ in your code?

    Ivan Friend
    #395941

    [PHP]echo “<span class=”day”>”.date (‘H’).”</span>”;
    echo ‘<span class=”day”>’.JHTML::_(‘date’, ‘now’, ‘H’).'</span>’;[/PHP]

    H – Displays the hour.

    echo “<span class=”day”>”.date (‘H’).”</span>”; – Displays the 15 (The code does not respond to install the time zone in administrative section joomla. The code does not respond to install the time zone in PHP5.3.6 and Apache server)
    That means Sunday will be replaced on Monday did not exactly at 00:00

    echo ‘<span class=”day”>’.JHTML::_(‘date’, ‘now’, ‘H’).'</span>’; – Displays the 18 (Code correct response to the time zone setting in the administrative section joomla)

    Possibly there is a more elegant solution but I have not found …

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

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

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