Skip to main content
.NET 8.0+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

XafApplication.SetLanguage(String) Method

Sets the specified language for the current application when called before the application windows are shown.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

#Declaration

public void SetLanguage(
    string languageName
)

#Parameters

Name Type Description
languageName String

A string value representing the name of the language that must be used in the application.

#Remarks

XAF application uses the language specified by the IModelApplication.PreferredLanguage property of the Application Model’s IModelApplication node (see Localization Basics). To set another language during application startup, use the SetLanguage method. The method assigns the languageName parameter value to the PreferredLanguage property. So, the specified language will be used even after the application is restarted.

See the SetFormattingCulture article for an example.

Note

The SetLanguage method does not work for XAF ASP.NET Core Blazor UI applications. Refer to the following topic for information on how to localize XAF ASP.NET Core Blazor UI applications: Localize an XAF Application (.NET).

Note

XAF applications are not designed to switch the language during application execution.

See Also