SimbaEngine X SDK includes sample string resources for the warning and error messages that it may generate. These strings are provide in English, as well as other languages including German, French, Spanish, and Japanese. These files are intended as a starting point to aid you in the localization process. You can modify the localized strings that are provided, provide your own driver-specific messages, and add support for additional languages.
The files provided for languages other than English are not complete. Some of these strings are still in English and require further translation.
Customers can configure the locale, or language, of the messages that the driver uses. Configuration can be done driver-wide so that all connections use the same locale for their messages, or per-connection so each connection uses a different locale.
Customers can configure the locale of driver for all connections (driver-wide locale) or for individual connections. If the locale is not configured, the default locale of US English (en-US) is used for all messages.
A single locale is specified for the driver, and all connections use the same language for any messages.
To configure the driver-wide locale on Windows:
To configure the driver-wide locale on Unix, Linux, and MacOS/X:
iniconfiguration file for the desired driver.
DriverLocalestring to contain the desired locale code. For a list of locale codes, see Locale Codes.
A locale is configured for each connection, so each connection can use a different language for error messages. If the locale is not configured for a connection, then the driver-wide locale is used.
To configure the connection-wide locale on Windows:
To configure the driver-wide locale on Unix, Linux, and macOS:
iniconfiguration file for the desired driver.
Localestring to contain the desired locale code. For a list of locale codes, see Locale Codes.
Locales are specified using a two-letter language code in lower case and an optional two letter country code in upper case. If a country code is specified, it must be separated from the language code by a hyphen (-).
The language code can be any language in the ISO 639-1 standard: http://www.loc.gov/standards/iso639-2/php/code_list.php. The country code can be any country in the ISO 3166-1 Alpha-2 standard: http://www.iso.org/iso/country_codes/iso-3166-1_decoding_table.htm.
The SimbaEngine X SDK provides English strings for the error and warning messages that its components generate. These messages are contained XML files for ODBC and in a Java Resource Bundle for JDBC. When developing your own driver, you can create additional messages in English for any errors and warnings that are specific to your driver. To provide your driver-specific messages, create driver-specific XML files or Java a Resource Bundle containing your messages in the same format as the exiting SimbaEngine X SDK message files. For information about error messages files, see Including Error Message Files.
DSIMessageSource automatically handles the loading and exposure of these messages to your driver. Your driver has to call
DSIMessageSource::RegisterMessages, passing in the root name of the driver specific message file. The root name is the file name without an extension or locale code. For example, the root name for the QuickStart driver is
QSMessages. A good place to call this method is in the constructor of the driver class that inherits from
The driver can also implement its own message source by inheriting from
DSIMessageSource and handling driver-specific messages, which may be in different format and location than those from the SimbaEngine X SDK. For example, the messages may be stored in a database. The handling of SDK messages in this case can still be delegated to
IMessageSource can be implemented directly, but the implementation must handle both the driver specific messages and the SimbaEngine X SDK messages. For more information on implementing error messages, see Using or Building a Message Source in Handling Errors and Exceptions.
To support a locale for which the SimbaEngine X SDK provides a translation when using the default
DSIMessageSource class, translate the messages in your driver-specific message file and follow the naming convention described in the following subsections. To support a locale for which the SDK does not provide a translation, translate both the driver-specific and SimbaEngine X SDK message files.
In addition to the languages that are shipped with the SimbaEngine X SDK, translated messages strings for other languages are also available. For more information on obtaining these strings, contact Simba Technologies Inc.