Globalization and Localization in the React Scheduler
The Scheduler component includes built-in localization to customize text for different languages and cultural preferences. Adapt UI text to languages like Arabic, German, and French by setting the locale property in a custom Provider with translation objects.
Configuration steps
-
Choose a
localefrom Syncfusion's React localization resources. -
Install the
@syncfusion/react-cldr-datapackage, which provides CLDR (Unicode Common Locale Data Repository) data for culture-specific formatting. -
Import
L10nandloadCldrfrom@syncfusion/react-base. -
Import localization files and CLDR data for your chosen languages:
-
Call
loadCldrwith the imported data to enable formatting for your selected cultures: -
Load translation objects using
L10n.load. -
Set the
localeproperty in theProviderto activate your chosen language.
Loading translations for culture
Use L10n.load from @syncfusion/react-base to load translation objects for different languages. This enables the Scheduler to dynamically display text in the desired language and regional format.
Setting date format
The Scheduler supports all valid date formats. By default, it uses the format "MM/dd/yyyy". If dateFormat is not specified, the format is derived from the current locale. With the default locale "en-US", the pattern is "MM/dd/yyyy".
Setting time format
Time format controls how time values display in the Scheduler. By default, the format (12-hour or 24-hour) is based on the current locale. The default "en-US" locale uses 12-hour format. Override it using the timeFormat property to display 24-hour format or other valid time formats.
timeFormataccepts only valid time format patterns.
First day of the week
Set the starting day of the week using the firstDayOfWeek property. Days map as: Sunday = 0, Monday = 1, Tuesday = 2, and so on.
Displaying Scheduler in RTL mode
Enable right-to-left layout by wrapping your app with Provider from @syncfusion/react-base and setting dir={'rtl'}. The Scheduler UI automatically flips to RTL conventions.