Home > BSPrinter documentation > Reference

GetLocalizedText Event

Applies to: PrintPreview, PrinterExEvents object

   Info     LanguageID     As     Long  
   Info     SubLanguageID     As     Long  
   Info     TextID     As     Long  
   Returns value     Text     As     String  
   Info     Number     As     Long  


Occurs for every caption or text that the component needs to display.

From the procedure of this event it is possible to translate the texts into any language that does not have built-in support by the component.

The LanguageID argument identifies the language. If the UILanguage property is set to 0 - bsLang_AUTO_SELECT (default setting), the LanguageID argument will have the code number of the actual user locale, but if that property is set to a specific locale code number, it will come always with that number. The list of possible values are in the BSLanguageIDConstants enumeration.

SubLanguageID: some languages can have a sub-language ID, it will be according to the locale of the user.
(the above two are already supported without doing anything)
SubLanguageID is intended to be used together with the language LanguageID.
You can ignore the SubLanguageID parameter if you want to provide the same Text for all locations of the language.

The TextID argument identifies what caption is requested. The list of possible values with the corresponding texts in English are in the BSUserInterfaceTextIDConstants enumeration.

The way to customize a text is to assign it to the Text parameter. It comes with a default text but it is a return parameter.

Number: This parameter is reserved, currently not used.


This event can be used to customize the texts, even if the language has built-in support for that language by the component.

For languages that do not have built-in support, English captions will be used.

When translating to a new language, many of them are standard texts that can be found with Microsoft terminology search

See Also:

UILanguage property
BSUserInterfaceTextIDConstants constants
BSLanguageIDAllConstants constants (all language constants)
BSLanguageIDConstants constants (language list with current built-in supportt)