(PHP 5 >= 5.3.0, PHP 7, PECL intl >= 1.0.0)
Get the locale for which the formatter was created.
public string MessageFormatter::getLocale ( void )
Object oriented style
Procedural style
Get the locale for which the formatter was created.
Parameters:
formatter
The formatter resource
Returns:
The locale name
Examples:
msgfmt_get_locale() example
1 2 3 4 | <?php $fmt = msgfmt_create( 'en_US' , "Number {0,number}" ); echo msgfmt_get_locale( $fmt ); ?> |
OO example
1 2 3 4 | <?php $fmt = new MessageFormatter( 'en_US' , "Number {0,number}" ); echo $fmt ->getLocale(); ?> |
See also:
Please login to continue.