Viewing 15 posts - 31 through 45 (of 91 total)
  • Author
    Posts
  • fistersn Friend
    #254937

    I have made a translation to norwegian.
    But there seems to be an error. Se http://sulkesligaen.no You will se the date saying NAME OF THE DAY, DATE IN THE MONTH. Generelt (default) 2008.
    How can I make it to show the name of the month instead of generelt?

    My code


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

    switch($day)
    {
    case "Monday": $day = "Mandag"; break;
    case "Tuesday": $day = "Tirsdag"; break;
    case "Wednesday": $day = "Onsdag"; break;
    case "Thursday": $day = "Torsdag"; break;
    case "Friday": $day = "Fredag"; break;
    case "Saturday": $day = "Lørdag"; break;
    case "Sunday": $day = "Søndag"; break;
    default: $day = "Generelt"; break;
    }

    switch($month)
    {
    case "January": $month = ".Januar"; break;
    case "February": $month = ".Februar"; break;
    case "March": $month = ".Mars"; 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 = ".Desember"; break;
    default: $month = ".Generelt"; break;
    }

    echo "<span>".$day."</span>";
    echo " <div>".date('j')." ".$month."</div>"; //* to change font, color, ecc... you have to modify templates/ja_teline_ii/css/template.css -> ja-day *//
    echo " <span>".date ('Y')."</span>";
    ?>
    </div>

    gaygiorgia Friend
    #254944

    <em>@fistersn 60680 wrote:</em><blockquote>I have made a translation to norwegian.
    But there seems to be an error. Se http://sulkesligaen.no You will se the date saying NAME OF THE DAY, DATE IN THE MONTH. Generelt (default) 2008.
    How can I make it to show the name of the month instead of generelt?

    My code


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

    switch($day)
    {
    case "Monday": $day = "Mandag"; break;
    case "Tuesday": $day = "Tirsdag"; break;
    case "Wednesday": $day = "Onsdag"; break;
    case "Thursday": $day = "Torsdag"; break;
    case "Friday": $day = "Fredag"; break;
    case "Saturday": $day = "Lørdag"; break;
    case "Sunday": $day = "Søndag"; break;
    default: $day = "Generelt"; break;
    }

    switch($month)
    {
    case "January": $month = ".Januar"; break;
    case "February": $month = ".Februar"; break;
    case "March": $month = ".Mars"; 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 = ".Desember"; break;
    default: $month = ".Generelt"; break;
    }

    echo "<span>".$day."</span>";
    echo " <div>".date('j')." ".$month."</div>"; //* to change font, color, ecc... you have to modify templates/ja_teline_ii/css/template.css -> ja-day *//
    echo " <span>".date ('Y')."</span>";
    ?>
    </div>

    </blockquote>
    U red nothing what i’ve written right?? :p
    U only copied the code… lol.
    The correct process is:
    1) read all,
    2) copy the code.
    Otherwise it happens that u understand nothing…

    Your problem is linked to the function
    date('m')

    if u visit this website i’ve already linked u know date(‘m’) output is: [01], [02], [03],…,[12]

    in my code date(‘m’) is sostituded by date(‘M’), which output is: [Jan],[Feb],…,.

    If u want to use your cases with extended names u have to change function date(‘m’) with function date(‘F’) which output is: [January],[February],…,.

    and DELETE this rows:
    $daynum = date(“j”);
    $year = date(“Y”);
    because u directly use the function, you do not need to insert them into a phpvariable…

    Ok? 🙂

    fistersn Friend
    #255063

    Thanks alot for the help. I confess that I haven’t red your post that wellm, but as my excuse I will say that I have used many hours now to get this template to work.

    trinhnfs Friend
    #256218

    🙂

    Hi, in Vietnamese, what can I do ?

    Sherlock Friend
    #256318

    Hi trinh !
    <em>@onboom 51525 wrote:</em><blockquote>Vietnamese – Tiếng Việt Nam:
    Fix update:
    [PHP]
    <div class=”ja-day”>
    <?php
    $day = date(“l”);
    $daynum = date(“j”);
    $month = date(“M”);
    $year = date(“Y”);

    switch($day)
    {
    case “Monday”: $day = “Thứ Hai, ngày”; break;
    case “Tuesday”: $day = “Thứ Ba, ngày”; break;
    case “Wednesday”: $day = “Thứ Tư, ngày”; break;
    case “Thursday”: $day = “Thứ Năm, ngày”; break;
    case “Friday”: $day = “Thứ Sáu, ngày”; break;
    case “Saturday”: $day = “Thứ Bảy, ngày”; break;
    case “Sunday”: $day = “Chủ Nhật, ngày”; break;
    default: $day = “Ngày”; break;
    }

    switch($month)
    {
    case “January”: $month = “Tháng 1, năm”; break;
    case “February”: $month = “Tháng 2, năm”; break;
    case “March”: $month = “Tháng 3, năm”; break;
    case “April”: $month = “Tháng 4, năm”; break;
    case “May”: $month = “Tháng 5, năm”; break;
    case “June”: $month = “Tháng 6, năm”; break;
    case “July”: $month = “Tháng 7, năm”; break;
    case “August”: $month = “Tháng 8, năm”; break;
    case “September”: $month = “Tháng 9, năm”; break;
    case “October”: $month = “Tháng 10, năm”; break;
    case “November”: $month = “Tháng 11, năm”; break;
    case “December”: $month = “Tháng 12, năm”; break;
    default: $month = “Tháng”; break;
    }

    echo $day . ” ” . $daynum . ” ” . $month . ” ” . $year;
    ?>
    </div>
    [/PHP]
    ————————————–
    Sample site here:
    Ja Teline II – Vietnamese</blockquote>

    good luck !

    trinhnfs Friend
    #256499

    Thanks 🙂

    By the way, take a look at my site. Dreams.vn. I have a new server and re-installer this CMS, but some thing out :

    Warning: mkdir() [function.mkdir]: Unable to access /home/dreams/domains/dreams.vn/public_html/images/resized/ in /home/dreams/domains/dreams.vn/public_html/modules/mod_janews/helper.php on line 102.

    Best Regards

    Trinh

    Sherlock Friend
    #256537

    Hi trinhnfs !
    Please change permission for images folder to 755 or 777.

    trinhnfs Friend
    #256735

    Hi 🙂

    images folder permission hate been changed, but nothing happend, and is there anything about security ???

    Thanks

    id31 Friend
    #258108

    And what must i paste for German Date Form…

    Give News please…

    Ltd.Lupo

    gaygiorgia Friend
    #258130

    <em>@id31 64489 wrote:</em><blockquote>And what must i paste for German Date Form…

    Give News please…

    Ltd.Lupo</blockquote>For german date form u have to paste any code u see here.
    u have only to translate days and months in your language… Even a child can do it….

    id31 Friend
    #258261

    That is easy translate the month and days…

    But what about the [PHP] <div class=”ja-day”>
    <?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;
    default: $day = “Onbekend”; break;
    }

    switch($month)
    {
    case “January”: $month = “Januar”; break;
    case “February”: $month = “Februar”; break;
    case “March”: $month = “März”; 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;
    default: $month = “Onbekend”; break;
    }

    echo $day . ” ” . $daynum . ” ” . $month . ” ” . $year;
    ?>
    </div>[/PHP]

    but the two lines…

    default: $day = “Onbekend”; break;

    and

    default: $month = “Onbekend”; break;

    Give News please…

    gaygiorgia Friend
    #258268

    default: $day = “undefinited”; break;
    default: $month = “undefinited”; break;

    translate in your language, or, if u prefer, siply ignore them.

    Them will be showed only if a different non expected day or month (we are speaking of server variable about) occurs. For example:
    – day “fri-sunday”, month “ago-cember” (ahahah impossible)
    or more a more realistic example:
    – “Mon” (server output) -> in case of “Monday” show me “Montag” -> since “Monday” is not occurred u’ll have got an “undefinited” as output.
    Is it clear?

    kohrs Friend
    #258803

    <em>@apitsch 51470 wrote:</em><blockquote>Hi PGLion,
    yes your code works on my site. And here the code for the german language:

    <div class="ja-day">
    <?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;
    default: $day = "Onbekend"; 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;
    default: $month = "Onbekend"; break;
    }

    echo $day . ", " . $daynum . ". " . $month . " " . $year;
    ?>
    </div>

    </blockquote>
    Thank’s a lot. It works …more or less: I now get the date: Mittwoch, 9. Onbekend 2008 . What is “Onbekend” (instead of “Juli”)???

    jbgorg Friend
    #258821

    Hi, Thanks for your help. May you tell me what’s the function of this line: default: $month = “Onbekend”; break; ? Another one I have added the code in a developer environmet all is ok but the month keeps in english, any idea? The code in spanish I’m using:

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

    switch($day)
    {
    case “Monday”: $day = “Lunes”; break;
    case “Tuesday”: $day = “Martes”; break;
    case “Wednesday”: $day = “Miécoles”; break;
    case “Thursday”: $day = “Jueves”; break;
    case “Friday”: $day = “Viernes”; break;
    case “Saturday”: $day = “Sábado”; break;
    case “Sunday”: $day = “Domingo”; break;

    }

    switch($month)
    {
    case “January”: $month = “Enero”; break;
    case “February”: $month = “Febrero”; break;
    case “March”: $month = “Marzo”; break;
    case “April”: $month = “Abril”; break;
    case “May”: $month = “Mayo”; break;
    case “June”: $month = “Junio”; break;
    case “July”: $month = “Julio”; break;
    case “August”: $month = “Agosto”; break;
    case “September”: $month = “Septiembre”; break;
    case “October”: $month = “Octubre”; break;
    case “November”: $month = “Noviembre”; break;
    case “December”: $month = “Diciembre”; break;

    }

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

    orpheus2510 Friend
    #259973

    <em>@kohrs 65330 wrote:</em><blockquote>Thank’s a lot. It works …more or less: I now get the date: Mittwoch, 9. Onbekend 2008 . What is “Onbekend” (instead of “Juli”)???</blockquote>

    For Germans: Onbekend (niederl.) = Unbekannt!
    Take from the english names of months only the first three letters – then it works.

Viewing 15 posts - 31 through 45 (of 91 total)

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

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