Localization > WPF Localization |
You have several options to localize a WPF application. For best practices from Microsoft, see best practices for Globalization and Localization in WPF. When you use ComponentOne controls in your application, the localized resources are automatically included in your output based upon the published language you specify in your project’s settings. They will come from their installed location under C:\Program Files\ComponentOne\WPF Edition\bin, and do not need to be added manually to the project.
Change the UI Culture of your application to the desired culture. One way of doing this is on the application's current thread. Add the below code to the MainWindow() constructor of your WPF application:
Visual Basic |
Copy Code
|
---|---|
' set culture to Spanish ("es") Thread.CurrentThread.CurrentUICulture = New CultureInfo("es") |
C# |
Copy Code
|
---|---|
// set culture to Spanish ("es") Thread.CurrentThread.CurrentUICulture = new CultureInfo("es"); |
Some controls have many baked in UI strings that can benefit from quick localization including C1Scheduler, C1DataGrid, C1DockControl, C1PdfViewer and C1RichTextBoxToolbar.