Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit31578cd

Browse files
committed
Updates about NLS
1 parent834a76f commit31578cd

File tree

1 file changed

+52
-10
lines changed

1 file changed

+52
-10
lines changed

‎doc/src/sgml/charset.sgml

Lines changed: 52 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.15 2001/11/15 06:15:34 ishii Exp $ -->
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.16 2001/11/18 20:33:32 petere Exp $ -->
22

33
<chapter id="charset">
44
<title>Localization</>
@@ -18,8 +18,8 @@
1818
<listitem>
1919
<para>
2020
Using the locale features of the operating system to provide
21-
locale-specific collation order, number formatting,and other
22-
aspects.
21+
locale-specific collation order, number formatting,translated
22+
messages, and otheraspects.
2323
</para>
2424
</listitem>
2525

@@ -76,6 +76,12 @@
7676
with servers with or without locale support.
7777
</para>
7878

79+
<para>
80+
To enable messages translated to the user's preferred language,
81+
the <option>--enable-nls</option> option must be used. This
82+
option is independent of the other locale support.
83+
</para>
84+
7985
<para>
8086
The information about which particular cultural rules to use is
8187
determined by standard environment variables. If you are getting
@@ -132,21 +138,36 @@ export LANG=sv_SE
132138
</tgroup>
133139
</informaltable>
134140

135-
<envar>LC_MESSAGES</> only affects the messages that come from the
136-
operating system, not <productname>PostgreSQL</>.
141+
Additionally, all of these specific variables and the
142+
<envar>LANG</> variable can be overridden with the
143+
<envar>LC_ALL</> environment variable.
137144
</para>
138145

146+
<note>
147+
<para>
148+
Some message localization libraries also look at the environment
149+
variable <envar>LANGUAGE</envar> which overrides all other locale
150+
settings for the purpose of setting the language of messages. If
151+
in doubt, please refer to the documentation of your operating
152+
system, in particular the
153+
<citerefentry><refentrytitle>gettext</><manvolnum>3</></> manual
154+
page, for more information.
155+
</para>
156+
</note>
157+
139158
<para>
140159
If you want the system to behave as if it had no locale support,
141160
use the special locale <literal>C</> or <literal>POSIX</>, or
142-
simply unset all localerelated variables.
161+
simply unset all locale-related variables.
143162
</para>
144163

145164
<para>
146-
Note that the locale behavior is determined by the environment
147-
variables seen by the server, not by the environment of any client.
148-
Therefore, be careful to set these variables before starting the
149-
postmaster.
165+
Note that the locale behavior of the server is determined by the
166+
environment variables seen by the server, not by the environment
167+
of any client. Therefore, be careful to set these variables
168+
before starting the server. A consequence of this is that if
169+
client and server are set up to different locales, messages may
170+
appear in different languages depending on where they originated.
150171
</para>
151172

152173
<para>
@@ -239,6 +260,27 @@ perl: warning: Falling back to the standard locale ("C").
239260
The directory <filename>src/test/locale</> contains a test suite
240261
for <productname>PostgreSQL</>'s locale support.
241262
</para>
263+
264+
<para>
265+
Client applications that handle server-side errors by parsing the
266+
text of the error message will obviously have problems when the
267+
server's messages are in a different language. If you create such
268+
an application you need to devise a plan to cope with this
269+
situation. The embedded SQL interface (<application>ecpg</>) is
270+
also affected by this problem. It is currently recommended that
271+
servers interfacing with <application>ecpg</> applications be
272+
configured to send messages in English.
273+
</para>
274+
275+
<para>
276+
Maintaining catalogs of message translations requires the on-going
277+
efforts of many volunteers that want to see
278+
<productname>PostgreSQL</> speak their preferred language well.
279+
If messages in your language is currently not available or fully
280+
translated, your assistance would be appreciated. If you want to
281+
help, refer to the <citetitle>Developer's Guide</> or write to the
282+
developers' mailing list.
283+
</para>
242284
</sect2>
243285
</sect1>
244286

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp