Localization in Windows Forms Spreadsheet
23 Jul 20261 minute to read
Localization is the process of adapting the application for a specific language or locale. Spreadsheet supports localizing all the static text in the Ribbon and all its dialogs to any desired language. You can perform localization by adding a resource file and setting the specific culture in the application.
Spreadsheet allows you to set custom resources using a .resx file. You can define your string values in a resource file for a specific culture and then set that culture in your application.
Set current UI culture to the application
To set the culture in the application, set CurrentUICulture before the InitializeComponent() method is called.
Set the culture information as shown in the following code:
public MainWindow()
{
System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("ja-JP");
InitializeComponent();
}Now, the application is set to the Japanese culture.
Localization using resource file
The following steps show how to implement localization in the Spreadsheet control:
- Create a folder named
Resourcesin your application. - Add the default English (en-US) resource file for
Spreadsheetto theResourcesfolder and name itSyncfusion.Spreadsheet.Windows.resx.
You can download the .resx file here. -
Create a .resx file under the
Resourcesfolder and name itSyncfusion.Spreadsheet.Windows.[Culture name].resx.
For example,Syncfusion.Spreadsheet.Windows.ja.resxfor the Japanese culture. - Add the resource keys and their corresponding localized values using the Resource Designer of the
Syncfusion.Spreadsheet.Windows.ja.resxfile.
For your reference, you can download the Japanese (ja-JP) .resx file here.
The following screenshot shows localization in the Spreadsheet:

Modifying the localized strings in resource file
You can modify the default localized strings by adding the default .resx (resource) file for Spreadsheet to the Resources folder of your application and naming it Syncfusion.Spreadsheet.Windows.resx.
Modify the default strings by changing the Name/Value pairs in the Syncfusion.Spreadsheet.Windows.resx file.
