You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-3Lines changed: 22 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,15 @@
1
-
# Localization in WPF DataGrid (SfDataGrid)
1
+
# How to Apply the Localization in WPF DataGrid?
2
2
3
-
This repository contains sample which shows localization of Syncfusion [WPF DataGrid](https://www.syncfusion.com/wpf-controls/datagrid).
3
+
This repository contains sample which shows localization of Syncfusion [WPF DataGrid](https://www.syncfusion.com/wpf-controls/datagrid) (SfDataGrid).
4
4
5
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
6
7
7
### Changing application culture
8
8
9
9
When you change the application culture, you can localize the application based on application culture by creating .resx file.
10
10
11
+
#### C#
12
+
11
13
```csharp
12
14
publicpartialclassMainWindow
13
15
{
@@ -19,6 +21,17 @@ public partial class MainWindow
You can create .resx files for any language by following these steps:
@@ -27,10 +40,16 @@ You can create .resx files for any language by following these steps:
27
40
28
41
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
42
43
+

44
+
30
45
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
46
47
+

48
+
32
49
4. Now, select Add and add resource file for German culture in `Resources` folder and set `AccessModifier` property to No code generation.
33
50
51
+

52
+
34
53
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.
0 commit comments