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