Localization in WPF Scheduler (SfScheduler)
27 Jan 20232 minutes to read
Localization is the process of customizing the user interface, based on a culture specific to a particular country or region in order to display the regional data. The culture is represented by a unique string, for example, βen-US β for U.S. English and β fr-FR β for French (common).
Localization is the key feature that provides solutions to global customers with the help of localized resource files provided by the control. The Scheduler supports localization, and creates a resource file for any culture to be applied in the scheduler.
Set Current UI Culture to the Application
Application culture can be changed by setting CurrentUICulture.
public MainWindow()
{
this.InitializeComponent();
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("fr-FR");
}
Localization using Resource file
To localize the Scheduler based on CurrentUICulture
using resource files, follow the below steps.
-
Create new folder, named as Resources in the application.
-
Add the default resource file of Scheduler into Resources folder.
NOTE
-
Right-click on the Resources folder, select Add and then NewItem.
-
In
Add New Item
wizard, select the Resource File option and name the filename as Syncfusion.SfScheduler.WPF.<culture name>.resx. For example, give the name as Syncfusion.SfScheduler.WPF.de.resx for German culture. -
The culture name that indicates the name of language and country.
- Now, select
Add
option to add the resource file in Resources folder.
- Add the Name/Value pair in Resource Designer of Syncfusion.SfScheduler.WPF.fr-FR.resx file and change its corresponding value to corresponding culture.
NOTE
View sample in GitHub. You can refer to our WPF Scheduler feature tour page for its groundbreaking feature representations.