Posted 14 March 2025, 2:46 am EST
There is a namespace for localization of the C1DbNavigator, but I cannot find any documentation on how to use it:
Is there an online example anywhere on how to set the C1DbNavigator culture, UI strings, etc. ?
Forums Home / ComponentOne / WinForms Edition
Posted by: abraham on 14 March 2025, 2:46 am EST
Posted 14 March 2025, 2:46 am EST
There is a namespace for localization of the C1DbNavigator, but I cannot find any documentation on how to use it:
Is there an online example anywhere on how to set the C1DbNavigator culture, UI strings, etc. ?
Posted 17 March 2025, 8:56 am EST
Hi Abraham,
By default, the C1DbNavigator uses CultureInfo.CurrentCulture to determine the system’s culture. Currently, it includes built-in localizations for English, Chinese, Japanese, Korean, and German cultures, automatically localizing to these cultures based on the CultureInfo.CurrentCulture object.
To localize the C1DbNavigator in other cultures, you can use resource files. Simply create a file named C1.Win.Input.DbNavigator.8.Culture.resx and save it under the C1LocalizedResources folder within your project.
For reference, we have attached a sample project that demonstrates how to localize the C1DbNavigator for the Dutch (Netherlands) culture - C1DbNavigatorLocalization.zip
Note: We used Google Translate to localize the strings from the English culture file, however, you can modify the translations as needed. The English culture file is also included for reference.
Best Regards,
Kartik
Posted 18 March 2025, 8:26 am EST
Thanks, that is certainly helpful, with that we can at least localise some stuff to our needs.
I noticed I can also at runtime access .Items.NavLabel.Text or .Items.NavNext.ToolTip to change these settings using the API, but having a culture specific localization is much more efficient indeed. Maybe include your sample in the help docs somewhere?
Thanks again.