mirror of
https://github.com/postgres/postgres.git
synced 2025-06-04 00:02:37 -04:00
Updates about NLS
This commit is contained in:
parent
834a76fe79
commit
31578cdeac
@ -1,4 +1,4 @@
|
|||||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.15 2001/11/15 06:15:34 ishii Exp $ -->
|
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.16 2001/11/18 20:33:32 petere Exp $ -->
|
||||||
|
|
||||||
<chapter id="charset">
|
<chapter id="charset">
|
||||||
<title>Localization</>
|
<title>Localization</>
|
||||||
@ -18,8 +18,8 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Using the locale features of the operating system to provide
|
Using the locale features of the operating system to provide
|
||||||
locale-specific collation order, number formatting, and other
|
locale-specific collation order, number formatting, translated
|
||||||
aspects.
|
messages, and other aspects.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
@ -76,6 +76,12 @@
|
|||||||
with servers with or without locale support.
|
with servers with or without locale support.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
To enable messages translated to the user's preferred language,
|
||||||
|
the <option>--enable-nls</option> option must be used. This
|
||||||
|
option is independent of the other locale support.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The information about which particular cultural rules to use is
|
The information about which particular cultural rules to use is
|
||||||
determined by standard environment variables. If you are getting
|
determined by standard environment variables. If you are getting
|
||||||
@ -132,21 +138,36 @@ export LANG=sv_SE
|
|||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
|
|
||||||
<envar>LC_MESSAGES</> only affects the messages that come from the
|
Additionally, all of these specific variables and the
|
||||||
operating system, not <productname>PostgreSQL</>.
|
<envar>LANG</> variable can be overridden with the
|
||||||
|
<envar>LC_ALL</> environment variable.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
Some message localization libraries also look at the environment
|
||||||
|
variable <envar>LANGUAGE</envar> which overrides all other locale
|
||||||
|
settings for the purpose of setting the language of messages. If
|
||||||
|
in doubt, please refer to the documentation of your operating
|
||||||
|
system, in particular the
|
||||||
|
<citerefentry><refentrytitle>gettext</><manvolnum>3</></> manual
|
||||||
|
page, for more information.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you want the system to behave as if it had no locale support,
|
If you want the system to behave as if it had no locale support,
|
||||||
use the special locale <literal>C</> or <literal>POSIX</>, or
|
use the special locale <literal>C</> or <literal>POSIX</>, or
|
||||||
simply unset all locale related variables.
|
simply unset all locale-related variables.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Note that the locale behavior is determined by the environment
|
Note that the locale behavior of the server is determined by the
|
||||||
variables seen by the server, not by the environment of any client.
|
environment variables seen by the server, not by the environment
|
||||||
Therefore, be careful to set these variables before starting the
|
of any client. Therefore, be careful to set these variables
|
||||||
postmaster.
|
before starting the server. A consequence of this is that if
|
||||||
|
client and server are set up to different locales, messages may
|
||||||
|
appear in different languages depending on where they originated.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -239,6 +260,27 @@ perl: warning: Falling back to the standard locale ("C").
|
|||||||
The directory <filename>src/test/locale</> contains a test suite
|
The directory <filename>src/test/locale</> contains a test suite
|
||||||
for <productname>PostgreSQL</>'s locale support.
|
for <productname>PostgreSQL</>'s locale support.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
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. If you create such
|
||||||
|
an application you need to devise a plan to cope with this
|
||||||
|
situation. The embedded SQL interface (<application>ecpg</>) is
|
||||||
|
also affected by this problem. It is currently recommended that
|
||||||
|
servers interfacing with <application>ecpg</> applications be
|
||||||
|
configured to send messages in English.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Maintaining catalogs of message translations requires the on-going
|
||||||
|
efforts of many volunteers that want to see
|
||||||
|
<productname>PostgreSQL</> speak their preferred language well.
|
||||||
|
If messages in your language is currently not available or fully
|
||||||
|
translated, your assistance would be appreciated. If you want to
|
||||||
|
help, refer to the <citetitle>Developer's Guide</> or write to the
|
||||||
|
developers' mailing list.
|
||||||
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user