Localization in UWP Spell Checker (SfSpellChecker)

28 Oct 20221 minute to read

Localization is the process of translating the application resources into different language for the specific cultures. You can localize the SfSpellChecker by adding resource file. Application culture can be changed by setting ApplicationLanguages.PrimaryLanguageOverride before InitializeComponent() method.

Below application culture changed to Arabic.

public MainPage()

{

    Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = "ar-SA";

    this.InitializeComponent();
}

To localize the SfSpellChecker based on ApplicationLanguages.PrimaryLanguageOverride using .resw files, follow the below steps.

  1. Create a folder named Resource in the application.

  2. Create a folder named culture name in the application. The culture name that indicates the name of language and country.

localizationimg1

  1. Right Click on project and select the “Add New Item” Dialog using Ctrl+Shift+A keys.

Create a resource .Resw file and name it as assembly name.Resources.resw (Syncfusion.SfSpellChecker.UWP.Resources.resw)

localizationimg2

For example, you have to give name as Syncfusion.SfSpellChecker.UWP.Resources.resw for Arabic culture.

  1. Add the Name/Value pair in Resource Designer of Syncfusion.SfSpellChecker.UWP.Resources.resw file and change its corresponding value to corresponding culture.

Localizationimg3

You can get the SfSpellChecker’s key from default resource [Syncfusion.SfSpellChecker.UWP.Resources.resw]
(https://www.syncfusion.com/downloads/support/directtrac/general/ze/Syncfusion.SfSpellChecker.UWP.Resources-1005709407.zip).

localizationimg4