The pgExpress Driver distribution contains two versions: a standard one, English only, and a Multilanguage version. Functionality is identical, except that the standard only contains the English (enUS) language, and the multilanguage version contains all languages from the table below:
Table 3.2. Embedded languages in this release (multilanguage driver only)
Language | Language Code |
---|---|
English | enUS |
Portuguese (Brazilian) | ptBR |
This by no means limits the languages that can be used with the pgExpress Driver; you can always do a new translation and load it. Instructions are in the next section.
To set localized messages, choose among the following methods:
Do nothing!... If you use the multilanguage driver and it
already has the same language reported by your OS, it will be
loaded automatically. The same will happen if you have a directory
locale\LL\LC_MESSAGES
with a
xx_XX.mo
file that matches your
language. Check the dxgettext documentation for details.
Use the ErrorResourceFile
parameter, with the xx_XX.mo
language file. This parameter will be passed by the VCL/CLX to the
pgExpress Driver, so it's the
recommended standard way to handle languages.
Use the Language special parameter. Set it to match one of the language codes of the Supported languages table.
Example 3.1.
[PGEConnection] BlobSize=32 Database=localhost/mydb,Language=deDE DriverName=PostgreSQL Password=temp123 User_Name=john
These entries represent the languages embedded on the multilanguage driver. If the language is not supported by the driver, or if you're not using the multilanguage version of the driver, this parameter will be ignored.
Call the PGEDriverUtils.SetLanguage()
function, passing
the
language code as parameter (embedded
languages only).
If you want to translate the pgExpress
Driver to another language not listed in here, just
translate the default.po
(English)
file. To customize/fix and existing translation, just edit it's
.po
file. Check the next section for
details.
A language code usually consists of a two-letter lowercase language code, an underscore, and a two-letter uppercase country code. On Windows, this is not case sensitive, but on Linux, it is. German in Germany becomes de_DE, English in England becomes en_GB, etc.
If you translate to a new language, please consider contributing
it to other users by sending the file to us. I this case, fill your
translator's data at the .po
file
header if you want.
libpq
library and/or PostgreSQL itself to get translated PostgreSQL error messages. Please refer to the
PostgreSQL's documentation for details.