Loclization in WPF Schedule
Localization is the process of customizing the user interface based on a culture specific to a particular country or region in order to display regional data. The culture is represented by a unique string, for example, ―en-US‖ for U.S. English and ―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 you can create a resource file for any culture to be applied in the schedule.
Set Current UI Culture to the Application
Application culture can be changed by setting CurrentUICulture
public MainWindow()
{
this.InitializeComponent();
//Download resx files from GitHub. https://github.com/syncfusion/wpf-demos/tree/master/Schedule/Localization/CS/Resources
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("fr-FR");
System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR");
}
Localization using Resource file
To localize the Scheduler based on CurrentUICulture
using resource files, follow the below steps.
1.Create new folder and named as Resources in your application.
2.Add the default resource file of Scheduler into Resources folder. You can download the Syncfusion.SfSchedule.WPF.resx here.
3.Right-click on the Resources folder, select Add and then NewItem.
4.In Add New Item
wizard, select the Resource File option and name the filename as Syncfusion.SfSchedule.WPF.<culture name>.resx. For example, you have to give name as Syncfusion.SfSchedule.WPF.de.resx for German culture.
5.The culture name that indicates the name of language and country.
6.Now, select Add
option to add the resource file in Resources folder.
7.Add the Name/Value pair in Resource Designer of Syncfusion.SfSchedule.WPF.fr-FR.resx file and change its corresponding value to corresponding culture.
You can get the sample from here