test
Viewing 15 posts - 46 through 60 (of 91 total)
  • Author
    Posts
  • gaygiorgia Friend
    #259984
    rubikonas Friend
    #260523

    well, i’ve tries to use this code, but it does not work perfectly.

    1) it gives default month value (obnekent ), so i have to erase this string

    2) original version date (Jul17) is in dark foreground, but when i replace original code into new, there is no dar foreground left… it looks much better in original version when there is a separation like this…

    orpheus2510 Friend
    #260560

    rubikonas;67431well, i’ve tries to use this code, but it does not work perfectly.

    1) it gives default month value (obnekent ), so i have to erase this string

    Just use the first three letters of the original names of month – Jan instead of January etc.
    AND READ THIS THREAD COMPLETELY! We have had this question and got the answer some time ago, just one post above your’s!

    2) original version date (Jul17) is in dark foreground, but when i replace original code into new, there is no dar foreground left… it looks much better in original version when there is a separation like this…

    Take a look also at this thread – it works (J1.5 – not for J1.0!), perhaps it can be a solution for you as well (the dark background is shown after the changes!)?

    nic0 Friend
    #260776

    use setlocale() and strftime()

    In line 113 rewrite:


    <?php
    setlocale(LC_TIME, "es_es");
    echo "<span>".strftime("%A")."</span>";
    echo " <div>".strftime('%d')." ".strftime ('de %B')."</div>";
    ?>

    Other parameters:
    PHP official ref: http://www.php.net/manual/en/function.strftime.php

    Modify CSS style to capitalize date:


    .ja-day {
    float: left;
    padding: 2px 0 0;
    text-transform:capitalize;
    }

    yata Friend
    #261170

    It’s my polish translation
    [PHP] <div class=”ja-day”>
    <?php
    $day = date(“l”);
    $month = date(“m”);

    switch($day)
    {
    case “Monday”: $day = “Poniedziałek”; break;
    case “Tuesday”: $day = “Wtorek”; break;
    case “Wednesday”: $day = “Środa”; break;
    case “Thursday”: $day = “Czwartek”; break;
    case “Friday”: $day = “Piątek”; break;
    case “Saturday”: $day = “Sobota”; break;
    case “Sunday”: $day = “Niedziela”; break;
    default: $day = “”; break;
    }

    switch($month)
    {
    case “1”: $month = “Stycznia”; break;
    case “2”: $month = “Lutego”; break;
    case “3”: $month = “Marca”; break;
    case “4”: $month = “Kwietnia”; break;
    case “5”: $month = “Maja”; break;
    case “6”: $month = “Czerwca”; break;
    case “7”: $month = “Lipca”; break;
    case “8”: $month = “Sierpnia”; break;
    case “9”: $month = “Września”; break;
    case “10”: $month = “Października”; break;
    case “11”: $month = “Listopada”; break;
    case “12”: $month = “Grudnia”; break;
    default: $month = “”; break;
    }

    echo $day . “, ” . date(“j”) . “. ” . $month . ” ” . date(“Y”);
    ?>
    </div>[/PHP]

    migors Friend
    #261734

    Can you tell me from where jateline 2 gets these dates, fromjoomla language file or somewhere else?

    If i dont wont to add code, is it possible to change language whwere it resists

    rubikonas Friend
    #261735

    you can go on easier way (i gess so)

    you can try to go to language/en_GB and to adapt all files by changing term from english to you language

    en_GB.in is the main file
    change words after “=”

    do not forget to backup files if anythuing goes wrong.

    good luck

    migors Friend
    #261745

    thanks for repley but nothing happens! I even delited that file en_GB. and no changes. So where does it takes data from?

    When i tried above solutions, them changes template. I am building one language website so if I change defoult language it would be ok. But how. I have instaled local Latvian language I canot find where change that f…… date 🙂 . it takes too long time

    rubikonas Friend
    #261746

    try to look in other files in that directory. they belong to other modules. It should work. I think.. 80 %

    rubikonas Friend
    #261749

    anyway,

    there are two dates in my teline II – http://www.piguperku.lt
    1 in the top
    I solved this problem by changing the code adding echo (search the forum – there must be date translation problem solved)

    other date is in the articles (created, updated). I solved it using earlier method, that i described (in lanuguage folder)

    migors Friend
    #261764

    Ok i managed, tried all examples and one was ok 🙂 I realy canot understand where from it takes that data?

    jbgorg Friend
    #262728

    Joomla Teline II takes date from server php libraries in this case:

    [PHP].ja-day {
    float: left;
    padding: 2px 0 0;
    text-transform:capitalize;
    }

    <?php
    setlocale(LC_TIME, “es_es”);
    echo “<span>”.strftime(“%A”).”</span>”;
    echo ” <div>”.strftime(‘%d’).” “.strftime (‘de %B’).”</div>”;
    ?>
    [/PHP]

    Where “es_es” is the language of the date (in this case Spanish), if you want english write: “en_en”

    migors Friend
    #262751

    thanks a lot

    dallacosta Friend
    #262929

    Attention: Change “Guigno” to “Giugno”

    <em>@felsimedia 52532 wrote:</em><blockquote>Italian:

    <div class=”ja-day”>
    <?php
    $day = date(“l”);
    $daynum = date(“j”);
    $month = date(“M”);
    $year = date(“Y”);

    switch($day)
    {
    case “Monday”: $day = “Lunedi”; break;
    case “Tuesday”: $day = “Martedi”; break;
    case “Wednesday”: $day = “Mercoledi”; break;
    case “Thursday”: $day = “Giovedi”; break;
    case “Friday”: $day = “Venerdi”; break;
    case “Saturday”: $day = “Sabato”; break;
    case “Sunday”: $day = “Domenica”; break;
    default: $day = “Ignoto”; break;
    }

    switch($month)
    {
    case “January”: $month = “Gennaio”; break;
    case “February”: $month = “Febbraio”; break;
    case “March”: $month = “Marzo”; break;
    case “April”: $month = “Aprile”; break;
    case “May”: $month = “Maggio”; break;
    case “June”: $month = “Guigno”; break;
    case “July”: $month = “Luglio”; break;
    case “August”: $month = “Agosto”; break;
    case “September”: $month = “Settembre”; break;
    case “October”: $month = “Ottobre”; break;
    case “November”: $month = “Novembre”; break;
    case “December”: $month = “Dicembre”; break;
    default: $month = “Ignoto”; break;
    }

    echo $day . “, ” . $daynum . “. ” . $month . ” ” . $year;
    ?>
    </div></blockquote>

    gaygiorgia Friend
    #263002

    <em>@dallacosta 70370 wrote:</em><blockquote>Attention: Change “Guigno” to “Giugno”</blockquote>
    quand’è che imparerete a non fermarvi ai primi 2 post?
    http://www.joomlart.com/forums/showpost.php?p=60296&postcount=28

Viewing 15 posts - 46 through 60 (of 91 total)

This topic contains 91 replies, has 47 voices, and was last updated by  juremmm 14 years, 5 months ago.

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