Podręcznik PHP






ngettext

(PHP 4 >= 4.2.0, PHP 5)

ngettext -- Plural version of gettext

Description

string ngettext ( string msgid1, string msgid2, int n )

ngettext() returns correct plural form of message identified by msgid1 and msgid2 for count n. Some languages have more than one form for plural messages dependent on the count.

Przykład 1. ngettext() 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

?>



zamki polskie


print 'Szkolenia kursy 1171501614' . "\n"; print 'Zamiatarki 1171501742' . "\n"; print 'wystawianie faktur 1171501918' . "\n"; print 'program do faktur 1171501915' . "\n"; print 'Viagra