1--TEST--
2Test ngettext() functionality
3--SKIPIF--
4<?php
5	if (!extension_loaded("gettext")) {
6		die("SKIP extension gettext not loaded\n");
7	}
8	if (!setlocale(LC_ALL, 'en_US.UTF-8')) {
9		die("SKIP en_US.UTF-8 locale not supported.");
10	}
11?>
12--FILE--
13<?php
14chdir(__DIR__);
15putenv('LC_ALL=en_US.UTF-8');
16setlocale(LC_ALL, 'en_US.UTF-8');
17bindtextdomain('dngettextTest', './locale');
18textdomain('dngettextTest');
19var_dump(ngettext('item', 'items', 1));
20var_dump(ngettext('item', 'items', 2));
21?>
22--EXPECT--
23string(7) "Produkt"
24string(8) "Produkte"
25--CREDITS--
26Christian Weiske, cweiske@php.net
27PHP Testfest Berlin 2009-05-09
28