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

search for in the

Locale::getScript> <Locale::getPrimaryLanguage
Last updated: Fri, 14 Aug 2009

view this page in

Locale::getRegion

locale_get_region

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

Locale::getRegion -- locale_get_regionRetourne un code pour la région de la locale

Description

Style orienté objet

static string Locale::getRegion ( string $locale )

Style procédural

string locale_get_region ( string $locale )

Retourne un code pour la région de la locale.

Liste de paramètres

locale

La locale dont il faut extraire le code de région.

Valeurs de retour

Le code de région pour la locale, ou bien NULL en cas d'erreur.

Exemples

Exemple #1 Exemple avec locale_get_region(), procédural

<?php
echo locale_get_region('de-CH-1901');
?>

Exemple #2 Exemple avec locale_get_region(), POO

<?php
echo Locale::getRegion('de-CH-1901');
?>

L'exemple ci-dessus va afficher :

CH

Voir aussi



add a note add a note User Contributed Notes
Locale::getRegion
There are no user contributed notes for this page.

Locale::getScript> <Locale::getPrimaryLanguage
Last updated: Fri, 14 Aug 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites