No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

Rechercher une fonction PHP

MessageFormatter::getLocale

msgfmt_get_locale

(PHP 5 >= 5.3.0, PHP 7, PECL intl >= 1.0.0)

MessageFormatter::getLocale -- msgfmt_get_localeGet the locale for which the formatter was created

PHP: MessageFormatter::getLocale - Manual Home of Manuel PHP  Contents Haut

Description

Object oriented style

public MessageFormatter::getLocale ( void ) : string

Procedural style

msgfmt_get_locale ( NumberFormatter $formatter ) : string

Get the locale for which the formatter was created.

PHP: MessageFormatter::getLocale - Manual Home of Manuel PHP  Contents Haut

Parameters

formatter

The formatter resource

PHP: MessageFormatter::getLocale - Manual Home of Manuel PHP  Contents Haut

Examples

Example #1 msgfmt_get_locale() example

<?php
$fmt 
msgfmt_create('en_US'"Number {0,number}");
echo 
msgfmt_get_locale($fmt);
?>

Example #2 OO example

<?php
$fmt 
= new MessageFormatter('en_US'"Number {0,number}");
echo 
$fmt->getLocale();
?>

The above example will output:

en_US
Find a PHP function
Error Infobrol

Can not display this page of the Infobrol website

Type of error (18-01)

Unknown format specifier "&"

Please try again in a few minutes…

Return to the home page




Steph