php man page for locale_lookup

Query: locale_lookup

OS: php

Section: 3

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

LOCALE_LOOKUP(3)							 1							  LOCALE_LOOKUP(3)

Locale::lookup - Searches the language tag list for the best match to the language

	Object oriented style

SYNOPSIS
publicstatic string Locale::lookup (array $langtag, string $locale, [bool $canonicalize = false], [string $default])
DESCRIPTION
Procedural style string locale_lookup (array $langtag, string $locale, [bool $canonicalize = false], [string $default]) Searches the items in $langtag for the best match to the language range specified in $locale according to RFC 4647's lookup algorithm.
PARAMETERS
o $langtag - An array containing a list of language tags to compare to $locale. Maximum 100 items allowed. o $locale - The locale to use as the language range when matching. o $canonicalize - If true, the arguments will be converted to canonical form before matching. o $default - The locale to use if no match is found.
RETURN VALUES
The closest matching language tag or default value.
EXAMPLES
Example #1 locale_lookup(3) example <?php $arr = array( 'de-DEVA', 'de-DE-1996', 'de', 'de-De' ); echo locale_lookup($arr, 'de-DE-1996-x-prv1-prv2', true, 'en_US'); ?> Example #2 OO example <?php $arr = array( 'de-DEVA', 'de-DE-1996', 'de', 'de-De' ); echo Locale::lookup($arr, 'de-DE-1996-x-prv1-prv2', true, 'en_US'); ?> The above example will output: de_de_1996
SEE ALSO
locale_filter_matches(3). PHP Documentation Group LOCALE_LOOKUP(3)
Related Man Pages
locale(3) - php
collator_asort(3) - php
locale_get_display_region(3) - php
locale_get_keywords(3) - php
locale_parse(3) - php
Similar Topics in the Unix Linux Community
Split A String
help - exec time too long
Help on some array problem!!
Need to have output of AWK array in one line
Multidimensional array:awk error