From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 14 Dec 2004 13:30:57 +0300 From: "Dmitry V. Levin" To: ALT Devel discussion list Subject: Re: [devel] Q: locale(7) hell Message-ID: <20041214103057.GB32499@basalt.office.altlinux.org> Mail-Followup-To: ALT Devel discussion list References: <20041214082818.GA16434@immo.ru> <20041214090540.GB16434@immo.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BwCQnh7xodEAoBMC" Content-Disposition: inline In-Reply-To: <20041214090540.GB16434@immo.ru> X-fingerprint: 9658 398D 181B 1200 8FC5 26B8 F6F8 846B C1E2 3429 X-BeenThere: devel@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2004 10:31:00 -0000 Archived-At: List-Archive: List-Post: --BwCQnh7xodEAoBMC Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 14, 2004 at 12:05:40PM +0300, Alexey I. Froloff wrote: > * Alexey I. Froloff [041214 11:29]: > > =F7=D3=D7=D1=DA=C9 =D3 =DC=D4=C9=CD =D7=CF=D0=D2=CF=D3 - =CB=D5=C4=C1 = =C4=C5=D7=C1=D4=D8 =E7=EE=F5=D4=CF=C5 =D2=C1=D3=DB=C9=D2=C5=CE=C9=C5 =D0=CF= =C4 > > =CE=C1=DA=D7=C1=CE=C9=C5=CD LANGUAGE? =F7=C1=D2=C9=C1=CE=D4=CF=D7 =C4= =D7=C1: > =F0=CF=D3=CD=CF=D4=D2=C5=CC =CB=C1=CB =D3=C4=C5=CC=C1=CE=CF =D7 gettext... >=20 > =E5=D3=CC=C9 =C5=D3=D4=D8 LANGUAGE - =C9=D3=D0=CF=CC=D8=DA=CF=D7=C1=D4=D8= =C5=C7=CF, =D0=D2=C9 =D5=D3=CC=CF=D7=C9=C9 =DE=D4=CF =C4=C1=CE=CE=C1=D1 > =CB=C1=D4=C5=C7=CF=D2=C9=D1 =CC=CF=CB=C1=CC=C9 =CE=C5 =D7=D9=D3=D4=C1=D7= =CC=C5=CE=C1 =D7 "C"... >=20 > =EF=C4=CE=C1=CB=CF =C2=C5=D2=D5=D4 =CD=C5=CE=D1 =D3=CF=CD=CE=C5=CE=C9=D1.= .. =F5 LC_ALL =C4=CF=CC=D6=C5=CE =C2=D9=D4=D8 =D3=C1=CD=D9=CA =C2=CF=CC=D8= =DB=CF=CA > =D0=D2=C9=CF=D2=C9=D4=C5=D4. =F7 gettext(3) =CE=C1=D0=C9=D3=C1=CE=CF =D3=CC=C5=C4=D5=C0=DD=C5=C5: Translation lookup operates in the context of the current locale. For the gettext and dgettext functions, the LC_MESSAGES locale facet is used. It is determined by a preceding call to the setlocale function. setlocale(LC_ALL,"") initializes the LC_MESSAGES locale based on the first nonempty value of the three environment variables LC_ALL, LC_MESSAGES, LANG; see setlocale(3). For the dcgettext function, the locale facet is determined by the category argument, which should be one of the LC_xxx constants defined in the header, excluding LC_ALL. In both cases, the functions also use the LC_CTYPE locale facet in order to convert the translated message from the translator's codeset to the current locale's codeset, unless overridden by a prior call to the bind_textdomain_codeset function. The message catalog used by the functions is at the pathname dirname/locale/category/domainname.mo. Here dirname is the directory specified through bindtextdomain. Its default is system and configuration dependent; typically it is prefix/share/locale, where prefix is the installation prefix of the package. locale is the name of the current locale facet; the GNU implementation also tries generalizations, such as the language name without the territory name. category is LC_MESSAGES for the gettext and dgettext functions, or the argument passed to the dcgettext function. If the LANGUAGE environment variable is set to a nonempty value, and the locale is not the "C" locale, the value of LANGUAGE is assumed to contain a colon separated list of locale names. The functions will attempt to look up a translation of msgid in each of the locales in turn. This is a GNU extension. =E2=D9=CC=CF =C2=D9 =D2=C1=DA=D5=CD=CE=CF =D2=C5=C1=CC=C9=DA=CF=D7=C1=D4=D8= =C1=CE=C1=CC=CF=C7=C9=DE=CE=CF=C5 =D0=CF=D7=C5=C4=C5=CE=C9=C5. --=20 ldv --BwCQnh7xodEAoBMC Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBvsDh9viEa8HiNCkRArpjAJ96+9g+IHqxfDAsNA3twL1H3ooCMQCfTkbs CQQrS0JeylBwAHA/B9Fnv9M= =5X3V -----END PGP SIGNATURE----- --BwCQnh7xodEAoBMC--