This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

language in calendar.js


  1. Phillipe
    Member

    Sorry for my english, first.
    I tried something, but strange it doesn't work.
    I see you use JavaScript Calendar by http://www.dynarch.com/projects/calendar/
    I decided to download the original calendar from mentioned site and to change the values in yours calendar.js from line 1851 to line 1904.
    I copied the information from the original archive/lang/calendar-ru.js and pasted it into your calendar.js.
    Now if I am with Firefox and click over the calendar icon it shows "undefined" and unknown symbols, if with IE the calendar doesn't work.
    What is the problem?

    Posted 17 years ago #
  2. yuniar

    Can you send me your calendar.js please? (mail to: yuniar [at] appnitro.com)

    I'll take a look


    MachForm Founder

    Posted 17 years ago #
  3. Phillipe
    Member

    I just sent you it. Check your mail please.

    Posted 17 years ago #
  4. Phillipe
    Member

    did you get my second letter?

    Posted 17 years ago #
  5. yuniar

    Got it. Replied back.
    Seems to be encoding problem. MachForm uses UTF-8.


    MachForm Founder

    Posted 17 years ago #
  6. Phillipe
    Member

    I didn't received your second letter.
    UTF-8 is ok for all new fields with cyrillic words I create. If I try to rename some words in view-functions.php to cyrillic the result is again unknown symbols.
    Seems the problem come from Java.

    Posted 17 years ago #
  7. yuniar

    Hmm.. we seem to have mail problem.

    Can you try to manually translate just few words in calendar.js? Is it broken too?

    For your view-functions.php file, try to pass your translation into utf8_encode() function.

    Like this:

    $translated_name = utf8_encode("Your Translated Name");

    then simply use the $translated_name to replace the original word.


    MachForm Founder

    Posted 17 years ago #
  8. Phillipe
    Member

    >>>> Can you try to manually translate just few words in calendar.js? Is it broken too?<<<

    yes again broken. I translated even only 1 word.

    >>>> $translated_name = utf8_encode("Your Translated Name");
    then simply use the $translated_name to replace the original word.<<<

    the result is same - unknown symbols. The browser show utf-8 encoding. If I manually change browser's encoding to Cyrillic(Windows-1251) the $translated_name is now readable, but all another is unknown symbols.
    All another are the texts for each field.

    Posted 17 years ago #
  9. yuniar

    Hmm.. can you paste me the URL to your form? I'll check


    MachForm Founder

    Posted 17 years ago #
  10. Phillipe
    Member

    I removed it, because can't use it in english language. Try yourself, change some java values in Cyrillic language or whatever language you want and you will see.

    Posted 17 years ago #
  11. yuniar

    Ok, I checked their forum and it seems some of the language available on their package doesn't seem to work properly as is. It needs to be converted into UTF-8.

    I found an online tool to do this
    http://kanjidict.stc.cx/recode.php

    Input Encoding: ISO-8859-1
    Output Encoding: UTF-8

    Paste any Cyrillic words there and it should be converted.

    For example, this code:

    Calendar._SDN = new Array
    ("вск",
     "пон",
     "втр",
     "срд",
     "чет",
     "пят",
     "суб",
     "вск");


    will be converted to:

    Calendar._SDN = new Array
    ("&# 1074;&# 1089;&# 1082;",
     "&# 1087;&# 1086;&# 1085;",
     "&# 1074;&# 1090;&# 1088;",
     "&# 1089;&# 1088;&# 1076;",
     "&# 1095;&# 1077;&# 1090;",
     "&# 1087;&# 1103;&# 1090;",
     "&# 1089;&# 1091;&# 1073;",
     "&# 1074;&# 1089;&# 1082;");


    It should be displayed properly now. (make sure to remove the spaces from the code above, I added the space because it doesn't displayed properly in this page)


    MachForm Founder

    Posted 17 years ago #
  12. Phillipe
    Member

    Yupeee !!!!!!!! Now works perfect :-)
    Thanks for your support !

    Posted 17 years ago #
  13. Phillipe
    Member

    hmm, edit: Work only in Firefox. In IE6.0 if you try to click on calendar's icon it doesn't show the calendar.

    Posted 17 years ago #
  14. yuniar

    Hmm.. that's weird. I've tested with IE 6.0 and it worked fine here.
    Try to clear your IE cache. Perhaps it was cached?

    If it still doesn't work either. I really need to check your form directly.
    If you aren't comfortable posting the link here, please mail me the link directly.


    MachForm Founder

    Posted 17 years ago #
  15. Phillipe
    Member

    Correct! Ctrl+F5 and now wokrks fine :) !

    Posted 17 years ago #
  16. yuniar

    awesome!


    MachForm Founder

    Posted 17 years ago #
  17. serega7777777
    Member

    problems with win1251
    ���������������������

    Posted 15 years ago #

RSS feed for this topic

Reply