blob: 4c2651fe2b8557a743140859c9e4ffdbad346e86 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
--TEST--
msgfmt_get_locale()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
--FILE--
<?php
/*
* Get locale.
*/
function ut_main()
{
$locales = array(
'en_UK',
'en_US@California',
'uk',
);
$res_str = '';
foreach( $locales as $locale )
{
$fmt = ut_msgfmt_create( $locale, "Test" );
$res_str .= "$locale: " . dump( ut_msgfmt_get_locale( $fmt ) );
$res_str .= "\n";
}
return $res_str;
}
include_once( 'ut_common.inc' );
// Run the test
ut_run();
?>
--EXPECT--
en_UK: 'en_UK'
en_US@California: 'en_US@California'
uk: 'uk'
|