X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=gettext-tools%2Fdoc%2Fgettext_11.html;h=a4a443a26b9167f8dc77a49cdf387aec42dad27d;hb=refs%2Fchanges%2F82%2F71082%2F1;hp=9cac0d0fb22eb5b3c23c81cebe2bd7ff16f05cb5;hpb=5d61132f836323aaf2879e04abc9d4056db248a2;p=platform%2Fupstream%2Fgettext.git diff --git a/gettext-tools/doc/gettext_11.html b/gettext-tools/doc/gettext_11.html index 9cac0d0..a4a443a 100644 --- a/gettext-tools/doc/gettext_11.html +++ b/gettext-tools/doc/gettext_11.html @@ -1,7 +1,7 @@
+ from gettext.texi on 28 December 2015 -->-
One aim of the current message catalog implementation provided by @@ -29,9 +29,9 @@ later explain our solution of this dilemma. -
catgets
catgets
@@ -64,9 +64,9 @@ therefore part of all Unix implementation (implementations, which are -
@@ -79,7 +79,7 @@ for the functions and the needed definitions are in the
-
+
catopen
is used like in this:
open
.
-
+
This handle is of course used in the catgets
function which can
be used like this:
@@ -130,7 +130,7 @@ should better be const char *
, but the standard is published in
- + The last of these functions is used and behaves as expected:
@@ -145,9 +145,9 @@ After this nocatgets
call using the descriptor is legal anymore.
-catgets
Interface?!catgets
Interface?!@@ -166,9 +166,9 @@ more easy to manage.
-gettext
gettext
@@ -183,7 +183,7 @@ The main point about this solution is that it does not follow the method of normal file handling (open-use-close) and that it does not burden the programmer with so many tasks, especially the unique key handling. Of course here also a unique key is needed, but this key is the message -itself (how long or short it is). See section 11.3 Comparing the Two Interfaces for a more +itself (how long or short it is). See section 11.3 Comparing the Two Interfaces for a more detailed comparison of the two methods.
@@ -197,9 +197,9 @@ in using this library will be interested in this description. -@@ -268,11 +268,11 @@ your language.
-@@ -346,9 +346,9 @@ unreliabilities.
-@@ -387,10 +387,10 @@ through the third argument.
-gettext
usesgettext
uses@@ -422,7 +422,7 @@ recommended that all msgids be US-ASCII strings.
bind_textdomain_codeset
function can be used to specify the
output character set for message catalogs for domain domainname.
The codeset argument must be a valid codeset name which can be used
@@ -454,12 +454,12 @@ global variable errno is set accordingly.
-
@@ -497,7 +497,7 @@ over the functions from <libintl.h>
.
const char *pgettext (const char *msgctxt, const char *msgid); @@ -532,8 +532,8 @@ fetches a particular translation of the msgid.const char *dpgettext (const char *domain_name, @@ -618,9 +618,9 @@ string literals, more general macros are available:const char *pgettext_expr (const char *msgctxt, const char *msgid); @@ -640,9 +640,9 @@ efficient. -11.2.6 Additional functions for plural forms
+11.2.6 Additional functions for plural forms
@@ -765,7 +765,7 @@ purpose.
ngettext
function is similar to the gettext
function
as it finds the message catalogs in the same way. But it takes two
extra arguments. The msgid1 parameter must contain the singular
@@ -836,7 +836,7 @@ printf (ngettext ("%$2d file removed from directory %$1s",
-See section 15.3.1 C Format Strings for details about this argument reordering syntax. +See section 15.3.1 C Format Strings for details about this argument reordering syntax.
@@ -875,7 +875,7 @@ In this case the number n is only used to choose the plural form.
dngettext
is similar to the dgettext
function in the
way the message catalog is selected. The difference is that it takes
two extra parameter to provide the correct plural form. These two
@@ -886,7 +886,7 @@ parameters are handled in the same way ngettext
handles them.
dcngettext
is similar to the dcgettext
function in the
way the message catalog is selected. The difference is that it takes
two extra parameter to provide the correct plural form. These two
@@ -911,9 +911,9 @@ possibility of extensions to not prevent the use of new languages).
-
-
-
+
+
+
The information about the plural form selection has to be stored in the
header entry of the PO file (the one with the empty msgid
string).
The plural form information looks like this:
@@ -941,7 +941,7 @@ value of nplurals
.
- + The following rules are known at this point. The language with families are listed. But this does not necessarily mean the information can be generalized for the whole family (as can be easily seen in the table @@ -970,6 +970,9 @@ Languages with this property include: Japanese, Vietnamese, Korean +
+Plural-Forms: nplurals=6; \ + plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 \ + : n%100>=11 ? 4 : 5; ++ +Languages with this property include: + +
@@ -1279,14 +1305,14 @@ is acceptable in English, and similarly for other languages.
The translators' perspective regarding plural forms is explained in -section 12.6 Translating plural forms. +section 12.6 Translating plural forms.
-@@ -1339,10 +1365,10 @@ find the result through a single cache lookup.
-#include <libintl.h> @@ -1407,7 +1433,7 @@ can use any that becomes available.- + The same procedure can be done for the
gettext_noop
invocations (see section 4.7 Special Cases of Translatable Strings). One usually definesgettext_noop
as a no-op macro. So you should consider the following code for your project: @@ -1486,12 +1512,12 @@ little bit. But it is not impossible to overcome.-
catgets
allows same original entry to have different translations, butgettext
has another, scalable approach for solving ambiguities -of this kind: See section 11.2.2 Solving Ambiguities. +of this kind: See section 11.2.2 Solving Ambiguities.11.4 Using libintl.a in own programs
+11.4 Using libintl.a in own programs
Starting with version 0.9.4 the library
-libintl.h
should be @@ -1502,7 +1528,7 @@ and the library in directories selected using the$(prefix)
.11.5 Being a
+gettext
grok11.5 Being a
gettext
grokNOTE: This documentation section is outdated and needs to be @@ -1520,7 +1546,7 @@ is a list comments:
LANGUAGE
-
+
-
+
LC_ALL
-
-
-
-
-
-
+
+
+
+
+
+
LC_xxx
, according to selected locale category
-
+
LANG
dcgettext
function as long as no new catalog is loaded. But
if dcgettext
is not called the program also cannot find the
-LANGUAGE
variable be changed (see section 11.2.7 Optimization of the *gettext functions). A
+LANGUAGE
variable be changed (see section 11.2.7 Optimization of the *gettext functions). A
solution for this is very easy. Include the following code in the
language switching function.
@@ -1584,7 +1610,7 @@ language switching function.
}
-
+
The variable _nl_msg_cat_cntr
is defined in ‘loadmsgcat.c’.
You don't need to know what this is for. But it can be used to detect
whether a gettext
implementation is GNU gettext and not non-GNU
@@ -1594,7 +1620,7 @@ system's native gettext implementation.
-NOTE: This documentation section is outdated and needs to be @@ -1604,7 +1630,7 @@ revised. -
There are two competing methods for language independent messages: @@ -1636,7 +1662,7 @@ see the Programming for Internationalization FAQ.
-catgets
catgets
There have been a few discussions of late on the use of @@ -1681,7 +1707,7 @@ of all Unix systems.
-Now it seems kind of wasteful to me to have two different systems @@ -1726,7 +1752,7 @@ the future.
-X/Open agreed very late on the standard form so that many