Skip to content

Commit e8da480

Browse files
ES-975464 - Resolve the ReadMe file length issue in this sample repository
1 parent 4573d55 commit e8da480

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

README.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
11
# WinForms DataGrid Localization
2-
This repository contains sample which shows localization of Syncfusion WinForms DataGrid (SfDataGrid).
3-
https://help.syncfusion.com/windowsforms/localization#localize-syncfusion-windows-forms-control-using-resx-file
2+
3+
This repository contains sample which shows localization of Syncfusion [WinForms DataGrid](https://www.syncfusion.com/winforms-ui-controls/datagrid) (SfDataGrid).
4+
5+
6+
You can [localize](https://help.syncfusion.com/windowsforms/localization#localize-syncfusion-windows-forms-control-using-resx-file) the `WinForms DataGrid` by adding resource file for each language.
7+
8+
### Changing application culture
9+
10+
When you are changing the application culture, then you can localize the application based on application culture by creating .resx file.
11+
12+
``` csharp
13+
public partial class Form1 : Form
14+
{
15+
public Form1()
16+
{
17+
Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("de-DE");
18+
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("de-DE");
19+
InitializeComponent();
20+
}
21+
}
22+
```
23+
24+
### Creating .resx files
25+
26+
You can create .resx files for any languages by following steps,
27+
28+
1. Right click your project and click `New Folder` and set name as `Resources`.
29+
30+
2. Add [Windows Forms Control Localization default resource files](https://github.com/syncfusion/winforms-controls-localization-resx-files) of libraries you are using into `Resources` folder.
31+
32+
3. Now, right click on `Resources` folder and select `Add` and then `New Item`. In the `Add New Item wizard`, select Resources File option and name the file name as `Syncfusion.SfDataGrid.WinForms.<culture name>.resx` for German culture. For example, you have to give name as `Syncfusion.SfDataGrid.WinForms.de-DE.resx` for `German` culture. In the same way, add new resource files for other libraries used in your application.
33+
34+
4. Now, select Add and add resource file for `German` culture in `Resources` folder.
35+
36+
5. Now, you can copy the key names from default resource files and change its corresponding value based on the culture.

0 commit comments

Comments
 (0)