Kodak KDS TWAIN Driver
Internationalization
06-Jun-2012
TWAIN supports internationalization, making it possible for an application to negotiate an awareness of the current language and country with the driver. This awareness is intended primarily for the driver’s GUI, but it has the potential to influence any textual output.
As of this writing fourteen languages are supported: Chinese Simplified, Chinese Traditional, Czechoslovakian, Dutch, English, French, German, Italian, Japanese, Korean, Portuguese Brazilian, Russian, Spanish, and Turkish. In situations where an unsupported sublanguage seems like the only possible match for a primary language, the primary language is selected (ex: French is substituted for French Canadian). If no match is possible the driver defaults to English.
There are four ways to negotiate the language with the driver. This document describes each method.
This is a part of the TWAIN Specification; please refer to it for more information.
When an application calls the DG_CONTROL / DAT_PARENT / MSG_OPENDSM message in state 2, it has to send the pointer to a TW_IDENTITY structure to the TWAIN Data Source Manager. This structure describes the application and includes a TW_IDENTITY.Language field. If the value of this field is TWLG_USERLOCALE, then the driver attempts to match the desktop language of the user. Any other value for this field will result in the driver attempting to use that language. For instance, if the application sets the field to TWLG_FRENCH, then the driver will load French regardless of the desktop locale.
In most cases a value of TWLG_USERLOCALE is preferred for this field.
This technique works for all versions of the driver; it has the lowest priority (which means it can be overridden by anything else).
This is a part of the TWAIN Specification; please refer to it for more information.
The driver allows the language to be changed in state 4 (programmatic negotiation). This may be necessary if the application is using a TWAIN toolkit. Some toolkits don’t allow the TW_IDENTITY.Language field to be selected, so the only way to change the language is as a part of normal negotiation.
This technique works for all versions of the driver; it has the highest priority (which means if you set it then you get it).
This is a custom feature. It is available for 6+ versions of the driver; it has the third highest priority.
In some instances the user may have no control of the application or the toolkit, so a special CONST.INI setting has been provided to allow the driver’s language to be changed. Edit the CONST.INI file and add the following line under the [dsIdentity] section.
DefaultLanguage=L_XX_YYY
Where L_XX_YYY is one of the following:
L_CH_CHN - Chinese Simplified
L_CH_TWN - Chinese Traditional
L_CS_CZE - Czechoslovakian
L_DE_DEU - German
L_EN_USA - English
L_ES_ESP - Spanish
L_FR_FRA - French
L_IT_ITA - Italian
L_JA_JPN - Japanese (for drivers prior to 11.x)
L_JP_JPN - Japanese (for drivers 11.x+)
L_KO_KOR - Korean
L_NL_NLD - Dutch
L_PT_BRA - Portuguese Brazilian
L_RU_RUS - Russian
L_TR_TUR - Turkish
This is a custom feature.
Older versions of the driver allowed the language to be selected from an environment variable. This method is preserved for backwards compatibility, but this is not the recommended way to negotiate the language. The value is numeric and is taken from the TWLG_* entries in the TWAIN.H header file.
41 - Chinese Simplified
43 - Chinese Traditional
45 - Czechoslovakian
1 - Dutch
2 - English
5 - French
6 - German
8 - Italian
68 - Japanese
69 - Korean
76 - Portuguese Brazilian
78 - Russian
11 - Spanish
85 - Turkish
This technique works for all versions of the driver except 5; it has the second highest priority.