jQuery UI
In general, to add localization to jQuery UI Datepicker, you need to include a specific localization file right after the Datepicker script is included. For example, to set French localization, you must do the following:
[...include jQuery and jQuery UI...] <script type="text/javascript" src="jquery.ui.datepicker-fr.js"></script>
Localization files are included in the standard jQuery UI download in a separate directory ( development-bundle/ui/i18n ). For more information, see the Datepicker API Documentation (in the "Localization" section).
Current Status: Farsi in, Jalali out
Currently, the jQuery UI download package does not seem to contain a Jalali localization file. At the moment, it seems that only the regular (Georgian) calendar has been translated into Farsi ( jquery.ui.datepicker-fr.js ).
Solution 1 - custom localization file
If you prefer to use the jQuery UI datepicker, you can create your own localization file based on the format of existing localization files. If you are familiar with the calendar in question, this should not be difficult.
Solution 2 - use a different plugin
Consider the jQuery Calendars plugin instead. It already includes most of the worldโs public calendars in several languages โโand formats , so the creation of Jalali or any other foreign calendar, for that matter, is done by clicking the settings.
Boaz
source share