Bengali Calender JQuery Datepicker Localization -
hi have been working bengali language in multilingual website, , when language set english need show jquery datepicker calender in english, , bengali need show in bengali.
i have used jquery datepicker localization.
i have gone through tutorial , process accomplished part of it. can show january, february etc. sat, sun etc in english , bengali . while in bengali, digit remains in english.
so, question is, there way out can change digit 0-9 in bengali digit ?
jquery(function($){ $.datepicker.regional['bn-bd'] = {"name":"bn-bd","closetext":"close","prevtext":"prev","nexttext":"next","currenttext":"today","monthnames":["জানুয়ারী","ফেব্রুয়ারী","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর",""],"monthnamesshort":["জানু.","ফেব্রু.","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগ.","সেপ্টে.","অক্টো.","নভে.","ডিসে.",""],"daynames":["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পতিবার","শুক্রবার","শনিবার"],"daynamesshort":["রবি.","সোম.","মঙ্গল.","বুধ.","বৃহস্পতি.","শুক্র.","শনি."],"daynamesmin":["র","স","ম","ব","ব","শ","শ"],"dateformat":"dd-mm-yy","firstday":1,"isrtl":false}; });
i use when detect bengali default language , set empty when detect default english.
if worst comes worst manually replace text, no?
$('.ui-datepicker-calendar tr td a').each(function() { var text = $(this).text(); $(this).text(text.replace('1', '১')); //repeat each number });
there's easier way, think should work.
note: you'll have pick out calendar's iframe first, content, , run on content find in it.
Comments
Post a Comment