mirror of
https://github.com/php/php-src.git
synced 2024-11-25 02:44:58 +08:00
25 lines
645 B
PHP
25 lines
645 B
PHP
--TEST--
|
|
Test dcgettext() functionality
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded("gettext")) {
|
|
die("skip gettext extension is not loaded.\n");
|
|
}
|
|
if (!setlocale(LC_ALL, 'en_US.UTF-8')) {
|
|
die("skip en_US.UTF-8 locale not supported.");
|
|
}
|
|
--FILE--
|
|
<?php
|
|
chdir(dirname(__FILE__));
|
|
setlocale(LC_MESSAGES, 'en_US.UTF-8');
|
|
setlocale(LC_ALL, 'en_US.UTF-8');
|
|
bindtextdomain('dngettextTest', './locale');
|
|
|
|
var_dump(dcgettext('dngettextTest', 'item', LC_CTYPE));
|
|
var_dump(dcgettext('dngettextTest', 'item', LC_MESSAGES));
|
|
--EXPECTF--
|
|
string(8) "cProdukt"
|
|
string(7) "Produkt"
|
|
--CREDITS--
|
|
Christian Weiske, cweiske@php.net
|
|
PHP Testfest Berlin 2009-05-09 |