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

search for in the

Locale::composeLocale> <Locale
[edit] Last updated: Fri, 23 Mar 2012

view this page in

Locale::acceptFromHttp

locale_accept_from_http

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

Locale::acceptFromHttp -- locale_accept_from_httpHTTP "Accept-Language" başlığıyla en iyi eşleşen yereli bulmaya çalışır

Açıklama

Nesne yönelimli kullanım

static string Locale::acceptFromHttp ( string $başlık )

Yordamsal kullanım

string locale_accept_from_http ( string $başlık )

HTTP "Accept-Language" başlığında talep edilen dillerle en uyumlu yereli bulmaya çalışır.

Değiştirgeler

başlık

"Accept-Language" başlığını RFC 2616'daki biçeme uygun olarak içeren dizge .

Dönen Değerler

Başlıkla eşleşen yerel.

Örnekler

Örnek 1 - locale_accept_from_http() örneği

<?php
$locale 
locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']);
echo 
$locale;
?>

Örnek 2 - Nesne yönelimli kullanım örneği

<?php
$locale 
Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']);
echo 
$locale;
?>

Yukarıdaki örneğin çıktısı:

tr_TR

Ayrıca Bakınız

  • locale_lookup() - En iyi eşleşen dili bulmak için dil yaftası listesini araştırır



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

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