php man page for http_negotiate_language

Query: http_negotiate_language

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

HTTP_NEGOTIATE_LANGUAGE(3)						 1						HTTP_NEGOTIATE_LANGUAGE(3)

http_negotiate_language - Negotiate client's preferred language

SYNOPSIS
string http_negotiate_language (array $supported, [array &$result])
DESCRIPTION
This function negotiates the client's preferred language based on its Accept-Language HTTP header. The qualifier is recognized and lan- guages without qualifier are rated highest. The qualifier will be decreased by 10% for partial matches (i.e. matching primary language).
PARAMETERS
o $supported - array containing the supported languages as values o $result - will be filled with an array containing the negotiation results
RETURN VALUES
Returns the negotiated language or the default language (i.e. first array entry) if none match.
EXAMPLES
Example #1 Using http_negotiate_language(3) <?php $langs = array( 'en-US',// default 'fr', 'fr-FR', 'de', 'de-DE', 'de-AT', 'de-CH', ); include './langs/'. http_negotiate_language($langs, $result) .'.php'; print_r($result); ?> PHP Documentation Group HTTP_NEGOTIATE_LANGUAGE(3)
Related Man Pages
array_flip(3) - php
array(3) - php
token_get_all(3) - php
locale_lookup(3) - php
debian::l10n::debconf(3pm) - debian
Similar Topics in the Unix Linux Community
Rules for Homework &amp; Coursework Questions Forum
Forum Video Tutorial: How to Use Code Tags
Coming Soon: Upgrade Forum Software (Dec 31 - Jan 1)
New Code Tags (Syntax Highlighting)
The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Don Cragun