You have the possibility to adapt the scheduler for a specific country or region by setting the related language of the interface.
To activate the necessary locale, you need to use the Set() method of the DHXScheduler.Localization class:
sched.Localization.Set(SchedulerLocalization.Localizations.German);
By default, the locales are found in the directory scripts/dhtmlxScheduler.
As soon as you call the Set() method, 2 new script tags are added to your page automatically:
Note, if you aren't going to use recurring events in the scheduler, you can pass the second parameter false to the Set() method. In this case, just the locale[lang_name].js_ script tag will be added to the page.
sched.Localization.Set(SchedulerLocalization.Localizations.German, false);
All the locales can be accessed through enumeration SchedulerLocalization.Localizations and they are:
Arabic |
French |
Norwegian |
In case the enum doesn't contain the locale needed for you, you can create a new one.
Note, a locale file must be written in JavaScript. For detailed description of such creating, refer to the related dhtmlxScheduler documentation.
To apply a newly-created locale to your scheduler, just specify in the Set() method the short name of this locale:
sched.Localization.Set('lang_name');
Note, if you aren't going to use recurring events in the scheduler, you can pass the second parameter false to the Set() method.
For example, if you created a new locale for the Lithuanian language, to apply it you should call:
sched.Localization.Set('lt');
Automatically, locale_lt.js and locale_recurring_lt.js will be added.
The DHXScheduler.Localization class has the only property: