Skip to content

Commit 4eec1f4

Browse files
ES-975464 - Resolve the ReadMe file length issue in this sample repository
1 parent 27d49a3 commit 4eec1f4

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
11
# Localization in WPF DataGrid (SfDataGrid)
22

3-
This repository contains sample which shows localization of Syncfusion WPF DataGrid.
4-
https://help.syncfusion.com/wpf/localization
3+
This repository contains sample which shows localization of Syncfusion [WPF DataGrid](https://www.syncfusion.com/wpf-controls/datagrid).
4+
5+
[Localization](https://help.syncfusion.com/wpf/localization) is the process of translating the application resources into different language for the specific cultures. You can localize the WPF DataGrid by adding a resource file for each language.
6+
7+
### Changing application culture
8+
9+
When you change the application culture, you can localize the application based on application culture by creating .resx file.
10+
11+
``` csharp
12+
public partial class MainWindow
13+
{
14+
public MainWindow()
15+
{
16+
InitializeComponent();
17+
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("de");
18+
}
19+
}
20+
```
21+
22+
### Creating .resx files
23+
24+
You can create .resx files for any language by following these steps:
25+
26+
1. Right-click your project and add a new folder named as `Resources`.
27+
28+
2. Add the [default resource files](https://github.com/syncfusion/wpf-controls-localization-resx-files) to the libraries you are using to the `Resources` folder and ensure `AccessModifier` is specified as Public.
29+
30+
3. Now, right-click `Resources` folder and select Add and then `NewItem`. In the `Add New Item` wizard, select the Resource File option and name the filename as `Syncfusion.SfGrid.WPF.<culture name>.resx`. For example, you have to give name as `Syncfusion.SfGrid.WPF.de.resx` for `German` culture. In the same way, add new resource files for other libraries used in your application.
31+
32+
4. Now, select Add and add resource file for German culture in `Resources` folder and set `AccessModifier` property to No code generation.
33+
34+
5. Now, you can copy the key names from the default resource files and assign values based on the culture and the resource files’ targets.
535

636
![Localized WPF DataGrid](wpf-datagrid-localization.PNG)

0 commit comments

Comments
 (0)