DataGrid for WPF and Silverlight Overview > DataGrid Features > Localizing the Application > Setting the Current Culture |
The C1DataGrid control will use localization files automatically according to the culture selected in the application as long as you haven't moved files to another location or excluded files from the project. By default, the current culture is designated as System.Threading.Thread.CurrentThread.CurrentUICulture. If you want to use a culture other than the current culture, you can set the desired culture in your application using the following code:
Visual Basic |
Copy Code
|
---|---|
Public Sub New() ' Set desired culture, for example here the French (France) locale. System.Threading.Thread.CurrentThread.CurrentUICulture = New System.Globalization.CultureInfo("fr-FR") ' InitializeComponent() call. ' Add any initialization after the InitializeComponent() call. InitializeComponent() End Sub |
C# |
Copy Code
|
---|---|
public MainPage() { // Set desired culture, for example here the French (France) locale. System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("fr-FR"); // InitializeComponent() call. InitializeComponent(); // Add any initialization after the InitializeComponent() call. } |