PDA

View Full Version : PATCH for jsCalendar in french


Vince
2004-12-07, 04:49 PM
French translation was awfull so I had to retranslate the file and I sent it to dynarch.com and to SugarCRM team.
I hope they will integrate it in the next version.

If you want to set your language and to set monday first instead of sunday there is 2 files to modify.
First replace :
echo '<script type="text/javascript" src="jscalendar/lang/calendar-en.js"></script>';
by :
echo '<script type="text/javascript" src="jscalendar/lang/calendar-'.substr($current_language,0,2).'.js"></script>';

then replace :
param_default("firstDay", 0); // defaults to "Sunday" first
by :
param_default("firstDay", 1); // defaults to "Sunday" first


substr($current_language,0,2) will keep only the 2 first letters of you language variable, it has to correspond to dynarch first 2 letters representing your language. In most case this will be ok, if not, just replace it by what you need.

HTH.

Vince