Contents
- Setting CurrentUICulture to the application
- Localize application level
Having trouble getting help?
Contact Support
Contact Support
The Localization in .NET MAUI Image Editor (SfImageEditor)
21 Jan 20251 minute to read
Localization is translating the application resources into different languages for specific cultures. The Image Editor can be localized by adding a resource
file.
Setting CurrentUICulture to the application
Application culture can be changed by setting CurrentUICulture
. in the App.xaml.cs
file.
using Syncfusion.Maui.ImageEditor;
using System.Resources;
public partial class App : Application
{
public App()
{
CultureInfo.CurrentUICulture = new CultureInfo("fr-FR");
//// ResXPath => Full path of the resx file; For example : //SfImageEditorResources.ResourceManager = new ResourceManager
// ("MauiImageEditorDemo.Resources.SfImageEditor", Application.Current.GetType().Assembly);
SfImageEditorResources.ResourceManager = new ResourceManager("ImageEditorLocalization.Resources.SfImageEditor", Application.Current.GetType().Assembly);
MainPage = new MainPage();
}
}
Localize application level
To localize the ImageEditor
based on the CurrentUICulture
using resource
files, follow the steps below.
- Add the default resource file of
ImageEditor
to theResources
folder of the application.
-
Right-click on the
Resources
folder, selectAdd
, and then chooseNewItem
. -
In the Add New Item wizard, select the Resource File option and name the filename as
SfImageEditor.<culture name>.resx.
For example, name itSfImageEditor.fr-FR.resx
for the French culture. -
The culture name indicates the name of the language and country.
- Now, select the
Add
option to add the resource file in the Resources folder.
- Add the Name/Value pair in the Resource Designer of the
SfImageEditor.fr-FR.resx
file and change its corresponding value to the corresponding culture.
NOTE