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