Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ngettext(3) [php man page]

NGETTEXT(3)								 1							       NGETTEXT(3)

ngettext - Plural version of gettext

SYNOPSIS
string ngettext (string $msgid1, string $msgid2, int $n) DESCRIPTION
The plural version of gettext(3). Some languages have more than one form for plural messages dependent on the count. PARAMETERS
o $msgid1 - o $msgid2 - o $n - RETURN VALUES
Returns correct plural form of message identified by $msgid1 and $msgid2 for count $n. EXAMPLES
Example #1 ngettext(3) example <?php setlocale(LC_ALL, 'cs_CZ'); printf(ngettext("%d window", "%d windows", 1), 1); // 1 okno printf(ngettext("%d window", "%d windows", 2), 2); // 2 okna printf(ngettext("%d window", "%d windows", 5), 5); // 5 oken ?> PHP Documentation Group NGETTEXT(3)

Check Out this Related Man Page

NGETTEXT(3)						     Library Functions Manual						       NGETTEXT(3)

NAME
ngettext, dngettext, dcngettext - translate message and choose plural form SYNOPSIS
#include <libintl.h> char * ngettext (const char * msgid, const char * msgid_plural, unsigned long int n); char * dngettext (const char * domainname, const char * msgid, const char * msgid_plural, unsigned long int n); char * dcngettext (const char * domainname, const char * msgid, const char * msgid_plural, unsigned long int n, int category); DESCRIPTION
The ngettext, dngettext and dcngettext functions attempt to translate a text string into the user's native language, by looking up the appropriate plural form of the translation in a message catalog. Plural forms are grammatical variants depending on the a number. Some languages have two forms, called singular and plural. Other languages have three forms, called singular, dual and plural. There are also languages with four forms. The ngettext, dngettext and dcngettext functions work like the gettext, dgettext and dcgettext functions, respectively. Additionally, they choose the appropriate plural form, which depends on the number n and the language of the message catalog where the translation was found. In the "C" locale, or if none of the used catalogs contain a translation for msgid, the ngettext, dngettext and dcngettext functions return msgid if n == 1, or msgid_plural if n != 1. RETURN VALUE
If a translation was found in one of the specified catalogs, the appropriate plural form is converted to the locale's codeset and returned. The resulting string is statically allocated and must not be modified or freed. Otherwise msgid or msgid_plural is returned, as described above. ERRORS
errno is not modified. BUGS
The return type ought to be const char *, but is char * to avoid warnings in C code predating ANSI C. SEE ALSO
gettext(3), dgettext(3), dcgettext(3) GNU gettext 0.11.4 May 2001 NGETTEXT(3)
Man Page

5 More Discussions You Might Find Interesting

1. AIX

Mutt 1.5 on Aix 5.3

Anyone out there successfully compile mutt 1.5 on AIX 5.3? I get an error on 'make install' but can't sort out what the issue is: # make install ./gen_defs ./OPS ./OPS.PGP ./OPS.SMIME ./OPS.CRYPT > keymap_defs.h ./patchlist.sh < ./PATCHES > patchlist.c echo... (0 Replies)
Discussion started by: eth0
0 Replies

2. Solaris

Orcallator in solaris servers

Hi, Anybody know configuration/installation of orcalator (sic, orcallater) on unix environment? Please share any document on orcalator. If you have any procedure for orcalator please send me. Already i read orcaware configuration.but it is not configuring. Please do needful.It is very... (11 Replies)
Discussion started by: arjunreddy3
11 Replies

3. AIX

Symbol resolution failed for gawk on AIX

Hi, I am installing bison-2.4.3 on AIX. I am facing the below error. Could not load program gawk: Symbol resolution failed for gawk because: Symbol __pthread (number 159) is not exported from dependent module /usr/lib/libpthreads.a(shr_xpg5.o). Symbol libintl_bindtextdomain (number... (5 Replies)
Discussion started by: susmitha_m
5 Replies

4. AIX

AIX and Value too large to be stored in data type.

root@test8:/config1>oslevel -s 5300-01-00-0000 root@test8:/config1>oslevel -r 5300-01 while moving a file sized 9GB i got this message root@test8:/configapp>mv bkp_14JUN16_oraapp_2.tgz /oraapp bkp_14JUN16_oraapp_2.tgz: Value too large to be stored in data type. possibly need APAR... (2 Replies)
Discussion started by: filosophizer
2 Replies

5. AIX

0509-036 tar error

Hello Everyone, root@test8:/>gunzip < /configapp/bkp_14JUN16_oraapp.tgz | /opt/freeware/bin/tar x> exec(): 0509-036 Cannot load program /opt/freeware/bin/tar because of the following errors: 0509-130 Symbol resolution failed for tar because: 0509-136 Symbol... (2 Replies)
Discussion started by: filosophizer
2 Replies