This class permits you to translate your forms automatically (by applying UNICODE captions and tips to your controls and to the form) using a external .ini file created in a certain way.
The translation .ini file is a standard .ini file optionally in UNICODE UTF16LE format.
The translation file has to be in this way:
Create as many sections as forms' names:
[form1] <-- the name of the form to translate
form1=pippo <- the caption of the form
button1=Press Here <- button1 caption
button1.Tip=Press this button <- button1 tip
[form2] <-- the name of the form2
It's possible to add special chars: [cr] for adding a line feed, # for adding comments, %1-%2-%3 for adding parameters (use the [GGS_Params] for retrieving the translation)
How to use this class:
1- Create a global instance of the class
Dim moMultiLngSupport As New clsMultiLngsupport
2- load a certain language using the Start method (only one time)
moMultiLngSupport.Start "arabic.lng", "Arial Unicode MS"
This method takes two parameters, the first is the name of the translation file, the second (optional) is the name of an UNICODE FONT Name to apply to every control.
3- in the Load event of forms call the ApplyToForm method
When translating a menu item this class passes the translation encoded using the Hex encoding, so your menu must have the StringMode property set to Hex ([ctlUniMenu.eUniMenuStringMode]).