BCGControlBar Library for .NET
Localization

BCGControlBar Library for .NET is designed to use it's own localization model, not the standard .NET localization. However it is still possible to use standard localization model for standard controls.

1.1. Localization for BCGControlBar .NET controls and components.
  1. Add component BCGSoft.Localization.Localizer to your form at Design time.
  2. Select component Localizer and click "Generate" Verb. You'll see "Save File" dialog.
  3. Type file name, choose location and save .xml file.
  4. Translate this .xml file into needed languages
  5. When you handle changing locale event within your application , you can use those static methods to pass .xml content for BCGControlBar controls and components localization:

static void ApplyLocaleFile (String^ xmlFile);
static void ApplyLocale (String^ xmlContent);

e.g.

void OnLocaleChanged ()
{
String fileName = "English.xml"
Localizer.ApplyLocaleFile(fileName);
}

For more details, please see our example: LocalizationSample.

1.2. How to translate the library resources to the new language

To localize internal forms and strings within the library you have to use BCGSoft.Shared.Localization project.

  1. Create copies of files Resource.resx and StringResource.resx.
  2. Rename them according to the languages and include them into the project. E.g. Resource.ru-Ru.resx, StringResource.ru-Ru.resx
  3. Translate strings within these files.
  4. Build new BCGSoft.Shared.Localization assembly.

 

 


Copyright © 1998 - 2015, BCGSoft Co Ltd. All Rights Reserved.

Send Feedback