2.9 KiB
Localization of Syncfusion UWP Controls using .resw files
This repository contains the default resources file (.resw) of Syncfusion UWP libraries. You can use this resource files to localize the strings for any selected language.
Localization of Syncfusion UWP controls
Localization is the process of translating the application resources into different language for the specific cultures. You can localize the syncfusion UWP controls by adding resource file for each language.
Changing application culture
When you are changing the application culture, then you can localize the application based on application culture by creating .resw file.
public MainPage()
{
CultureInfo.CurrentUICulture = new CultureInfo("de");
this.InitializeComponent();
}
Creating a .resw file
You can create .resw files for any language by following steps,
-
Right click your project and click
New Folder
and set name asResources
. -
Add the default resource file of libraries you are using to the
Resources
folder.
Consider you are using
SfDataGrid
control in your application. Then you need to copy and includeSyncfusion.SfGrid.UWP.Resources.resw
(sinceSfDataGrid
present inSyncfusion.SfGrid.UWP
library) file in your application underResources
folder. So, now you can know the key names and values of default strings used inSyncfusion.SfGrid.UWP.dll
library.
- Now, right click on
Resources
folder and selectAdd
and thenNewItem
. In theAdd New Item
wizard, selectResources File
option and name the file name asSyncfusion.SfGrid.UWP.Resources.<culture name>.resw
. For example, you have to give name asSyncfusion.SfDataGrid.UWP.Resources.de.resw
forGerman
culture. In the same way, add new resource files for other libraries used in your application.
- Now, select
Add
and add resource file for german culture inResources
folder.
- Now, you can copy the key names from default resource files and assign value based on the culture, the resource file targets.
Download demo from GitHub
Editing default culture settings
You can change the default string of any control by adding the default .resw files (from GitHub) to Resources
folder of your application. Syncfusion UWP controls reads the default string from the .resw files of application if its added.