|
|
| · · · · · · · | |
pgAdmin 1.4 online documentationChapter 21. LocalizationTable of Contents This chapter describes the available localization features from the point of view of the administrator. PostgreSQL supports localization with two approaches:
21.1. Locale SupportLocale support refers to an application respecting cultural preferences regarding alphabets, sorting, number formatting, etc. PostgreSQL uses the standard ISO C and POSIX locale facilities provided by the server operating system. For additional information refer to the documentation of your system. 21.1.1. Overview Locale support is automatically initialized when a database
cluster is created using initdb --locale=sv_SE
This example sets the locale to Swedish ( Occasionally it is useful to mix rules from several locales, e.g., use English collation rules but Spanish messages. To support that, a set of locale subcategories exist that control only a certain aspect of the localization rules:
The category names translate into names of
If you want the system to behave as if it had no locale support,
use the special locale The nature of some locale categories is that their value has to be
fixed for the lifetime of a database cluster. That is, once
The other locale categories can be changed as desired whenever the
server is running by setting the run-time configuration variables
that have the same name as the locale categories (see Section 17.10.2, “Locale and Formatting” for details). The defaults that are
chosen by Note that the locale behavior of the server is determined by the environment variables seen by the server, not by the environment of any client. Therefore, be careful to configure the correct locale settings before starting the server. A consequence of this is that if client and server are set up in different locales, messages may appear in different languages depending on where they originated. Note When we speak of inheriting the locale from the execution
environment, this means the following on most operating systems:
For a given locale category, say the collation, the following
environment variables are consulted in this order until one is
found to be set: Some message localization libraries also look at the environment
variable To enable messages to be translated to the user's preferred language, NLS must have been enabled at build time. This choice is independent of the other locale support. 21.1.2. BehaviorThe locale settings influence the following SQL features:
The drawback of using locales other than As a workaround to allow PostgreSQL to use indexes
with 21.1.3. Problems If locale support doesn't work in spite of the explanation above,
check that the locale support in your operating system is
correctly configured. To check what locales are installed on your
system, you may use the command Check that PostgreSQL is actually using the locale
that you think it is. The directory Client applications that handle server-side errors by parsing the text of the error message will obviously have problems when the server's messages are in a different language. Authors of such applications are advised to make use of the error code scheme instead. Maintaining catalogs of message translations requires the on-going efforts of many volunteers that want to see PostgreSQL speak their preferred language well. If messages in your language are currently not available or not fully translated, your assistance would be appreciated. If you want to help, refer to Chapter 45, Native Language Support or write to the developers' mailing list. |