XtraLocalizer.UserResourceManager Property
Gets or sets the resource manager.
Namespace: DevExpress.Utils.Localization
Assembly: DevExpress.Data.v24.1.dll
NuGet Package: DevExpress.Data
Declaration
Property Value
Type | Description |
---|---|
ResourceManager | The resource manager. |
Remarks
The XtraLocalizer
class allows you to create and use RESX files with custom localization strings. Follow the steps below:
Create separate RESX files with translated resource strings for each of the supported cultures/languages.
Add RESX files to your project.
Rebuild the project.
Use the
UserResourceManager
property to initialize the resource manager. You can obtain the required object reference by using the folder and file name (namespace and class name) you chose for the custom resource file. Compare the highlighted code line to the Solution Explorer screenshot above.static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); CultureInfo culture = CultureInfo.CreateSpecificCulture("de-DE"); Thread.CurrentThread.CurrentUICulture = culture; Thread.CurrentThread.CurrentCulture = culture; CultureInfo.DefaultThreadCurrentCulture = culture; CultureInfo.DefaultThreadCurrentUICulture = culture; XtraLocalizer.UserResourceManager = Localization.myResources.ResourceManager; Application.Run(new Form1()); }