Devexpress Localization 14.1
Devexpress Localization 14.1 | 36 Mb
Developer Express .NET products have always been designed and developed bearing in mind that you may require the need to localize your application for different markets. The XtraGrid Suite is no exception in this regard. There are two main methods to localize labels and messages displayed by our WinForms products.
Using Localized Satellite Assemblies
Using Satellite Resource Assemblies is a common approach for developing world-ready applications. The DXperience installation ships with several pre-built satellite assemblies containing translations that were kindly provided by our customers. This means you can effortlessly translate your UI to many wide-spread languages including Spanish, German, Japanese and Russian.
To use satellite resource assemblies, simply place them in appropriate locations so that they can be found by the common language runtime. You can install them into the GAC (Global Assembly Cache) or place them into subfolders of your application. Please check the following help topic for additional details on where to obtain the assemblies and what languages are currently available: Localize DevExpress WinForms Controls Using Satellite Assemblies
Creating a Custom Localizer Object
Our products additionally allow you to create a custom object and thus change the necessary built-in strings. Note that this method is not only useful when translating your UI. You can also use it when you simply need to change the wording in a few messages.
All you need to do is create a descendant Localizer class and override its GetLocalizedString method. The sample code below shows how you can provide German equivalents for menu options available in DevExpress WinForms Editors:
[C#]
public class GermanLocalizer : DevExpress.XtraEditors.Controls.Localizer {
public override string GetLocalizedString(StringId id){
switch(id) {
case StringId.PictureEditMenuCut: return "Ausschneiden";
case StringId.PictureEditMenuCopy: return "Kopieren";
case StringId.PictureEditMenuPaste: return "Einfügen";
case StringId.PictureEditMenuDelete: return "Löschen";
// ...
}
return "";
}
}
Then you simply assign your localizer class instance to the static DevExpress.XtraEditors.Controls.Localizer.Active object and all your editors will now use the translated strings.
[C#]
Localizer.Active = new GermanLocalizer();
Home:
https://www.devexpress.com
[/b]
[b] Only for V.I.P
Warning! You are not allowed to view this text.