Localization of the WPF Chart can be customized by using the CurrentUICulture property in the WPF Chart. You can change the language by assigning the culture name of the desired language to this property.
public MainWindow()
{
InitializeComponent();
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("fr-FR");
}
-
Create new folder, named as Resources in the application.
-
Right-click on the Resources folder, select Add, and then click New Item. In the Add New Item dialog, select the Resource File option and name the file as
Syncfusion.SfChart.WPF.<culture name>.resx
. For example, name it asSyncfusion.SfChart.WPF.fr-FR.resx
to add localization support for the French language.
- The culture name that indicates the name of language and country.
- Now, add the Name/Value pair in Resource Designer of Syncfusion.SfChart.WPF.fr-FR.resx file and change its corresponding value to the corresponding culture.
The following image illustrates the WPF Chart successfully localized in the French language, displaying the changes applied through the provided localization steps.
If you are facing a path too long exception when building this example project, close Visual Studio and rename the repository to a shorter name before building the project.
For more details, refer to the KB on how to localize lables in WPF chart control?.