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

search for in the

NumberFormatter::getPattern> <NumberFormatter::getErrorMessage
[edit] Last updated: Fri, 17 May 2013

view this page in

NumberFormatter::getLocale

numfmt_get_locale

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

NumberFormatter::getLocale -- numfmt_get_localeObtener la configuración regional de un formateador

Descripción

Estilo orientado a objetos

string NumberFormatter::getLocale ([ int $type ] )

Estilo por procedimientos

string numfmt_get_locale ( NumberFormatter $fmt [, int $type ] )

Obtener el nombre de la configuración regional de un formateador.

Parámetros

fmt

Un objeto de la clase NumberFormatter.

type

Se puede escoger entre una configuración regional válida y real ( Locale::VALID_LOCALE y Locale::ACTUAL_LOCALE, respectivamente). La configuración regional real es la predeterminada.

Valores devueltos

El nombre de la configuración regional usado para crear el formateador.

Ejemplos

Ejemplo #1 Ejemplo de numfmt_get_locale()

<?php
$req     
'fr_FR_PARIS';
$fmt     numfmt_create$req,  NumberFormatter::DECIMAL);
$res_val numfmt_get_locale$fmtLocale::VALID_LOCALE );
$res_act numfmt_get_locale$fmtLocale::ACTUAL_LOCALE );
printf"Nombre regional pedido: %s\nNombre regional válido: %s\nNombre regional real: %s\n",
         
$req$res_val$res_act );
?>

El resultado del ejemplo sería:

Nombre regional pedido: fr_FR_PARIS
Nombre regional válido: fr_FR
Nombre regional real: fr

Ver también



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

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