XafApplication.CustomizeFormattingCulture Event
Occurs after a formatting culture has been set internally.
Namespace: DevExpress.ExpressApp
Assembly: DevExpress.ExpressApp.v18.1.dll
Declaration
Event Data
The CustomizeFormattingCulture event's data class is CustomizeFormattingCultureEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
FormattingCulture | Specifies the culture currently set for the application. |
PreferredLanguageName | Specifies the language currently set for the Application Model‘s IModelApplication.PreferredLanguage property. |
UserLanguageName | Specifies the language which is set in the user’s operating system or passed by the Internet browser. |
Remarks
In XAF applications, formatting options for information like currency, numbers, and dates are not related to the application’s language. The formatting options that are set in the current user’s operating system or passed by the Internet browser are used. Handle this event to set the required formatting culture for the Thread.CurrentCulture object. To get the culture currently set, use the handler’s CustomizeFormattingCultureEventArgs.FormattingCulture property. In addition, you can get the language which is set in the user’s operating system or passed by the Internet browser. For this purpose, use the handler’s CustomizeFormattingCultureEventArgs.UserLanguageName property. To get the language which is currently set for the IModelApplication node’s IModelApplication.PreferredLanguage property, use the handler’s CustomizeFormattingCultureEventArgs.PreferredLanguageName property.
To see an example of handling this event, refer to the Culture-Specific Formatting topic.