All docs
V21.1
21.2 (EAP/Beta)
21.1
20.2
The page you are viewing does not exist in version 20.2. This link will take you to the root page.
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Standard 2.0+
.NET Framework 4.5.2+
The page you are viewing does not exist in the .NET Framework 4.5.2+ platform documentation. This link will take you to the parent topic of the current section.
.NET Standard 2.0+
.NET Core 3.0+

IXafCultureInfoService Interface

Declares members of a localization service.

Namespace: DevExpress.ExpressApp.Blazor.Services

Assembly: DevExpress.ExpressApp.Blazor.v21.1.dll

Declaration

public interface IXafCultureInfoService

Remarks

XAF features a built-in implementation of the IXafCultureInfoService interface.

Example

The code sample below demonstrates how to use IXafCultureInfoService to change the application localization.

using DevExpress.ExpressApp; 
using DevExpress.ExpressApp.Actions; 
using DevExpress.ExpressApp.Blazor; 
using DevExpress.ExpressApp.Blazor.Services; 
using DevExpress.Persistent.Base; 

namespace MainDemo.Module.Blazor.Controllers { 
    public class GermanCultureController : ViewController { 
        BlazorApplication BlazorApplication => (BlazorApplication)Application; 
        IXafCultureInfoService CultureInfoService => (IXafCultureInfoService)BlazorApplication.ServiceProvider.GetService(typeof(IXafCultureInfoService)); 
        public GermanCultureController() { 
            SimpleAction myAction = new SimpleAction(this, "SetGermanCulture", PredefinedCategory.Edit); 
            myAction.Execute += async (s, e) => await CultureInfoService.SetCultureAsync("de"); 
        } 
    } 
} 
See Also