Converting Annotation Automation Dialogs to Other Languages
The annotation DLL provided with the English version of LEADTOOLS produces annotation automation dialogs with English strings. To convert the annotation automation dialogs to other languages, it is necessary to modify the dialog strings and, depending on the language, the font size and name. For languages that use English characters, the dialogs can be translated by just changing the dialog strings. This can be done as follows:
L_AnnSetAutoText(hAutomation, ANNAUTOTEXT_XXX, "Translated String");
For some languages, such as Japanese and Chinese, special fonts are required to display the characters of that language. These characters are often larger than English characters. Consequently, it is necessary to change the dialog strings, the font name and the font size. For example, to use Japanese strings with the English annotation DLL, the following must be done:
1. |
Change the font size and name for the automation dialogs as follows: |
// Change the font size.
// The English version uses 8 as a default.
// The Japanese version uses 9.
L_AnnSetAutoDialogFontSize(hAutomation, 9);
//Change the font name.
L_AnnSetAutoText(hAutomation, ANNAUTOTEXT_DIALOG_FONT, TEXT("Japanese Font Name"));
2. |
Change all the automation strings as follows: |
L_AnnSetAutoText(hAutomation, ANNAUTOTEXT_XXX, TEXT("New Japanese String."));
3. |
Change the default font to be used for all annotation objects (except buttons) created with this automation object. |
L_AnnSetFontName(hAutomation, TEXT("Japanese Font Name"));