downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

MessageFormatter::getPattern> <MessageFormatter::getErrorMessage
[edit] Last updated: Thu, 23 May 2013

view this page in

MessageFormatter::getLocale

msgfmt_get_locale

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

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

Descrição

Estilo orientado à objeto

string MessageFormatter::getLocale ( void )

Estilo procedural

string msgfmt_get_locale ( NumberFormatter $formatter )

Get the locale for which the formatter was created.

Parâmetros

formatter

The formatter resource

Valor Retornado

The locale name

Exemplos

Exemplo #1 msgfmt_get_locale() example

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

Exemplo #2 OO example

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

O exemplo acima irá imprimir:

en_US

Veja Também



add a note add a note User Contributed Notes MessageFormatter::getLocale - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites