php man page for locale_parse

Query: locale_parse

OS: php

Section: 3

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

LOCALE_PARSE(3) 							 1							   LOCALE_PARSE(3)

Locale::parseLocale - Returns a key-value array of locale ID subtag elements.

	Object oriented style

SYNOPSIS
publicstatic array Locale::parseLocale (string $locale)
DESCRIPTION
Procedural style array locale_parse (string $locale) Returns a key-value array of locale ID subtag elements.
PARAMETERS
o $locale - The locale to extract the subtag array from. Note: The 'variant' and 'private' subtags can take maximum 15 values whereas 'ext- lang' can take maximum 3 values.
RETURN VALUES
Returns an array containing a list of key-value pairs, where the keys identify the particular locale ID subtags, and the values are the associated subtag values. The array will be ordered as the locale id subtags e.g. in the locale id if variants are '-varX-varY-varZ' then the returned array will have variant0=>varX , variant1=>varY , variant2=>varZ
EXAMPLES
Example #1 locale_parse(3) example <?php $arr = locale_parse('sl-Latn-IT-nedis'); if ($arr) { foreach ($arr as $key => $value) { echo "$key : $value , "; } } ?> Example #2 OO example <?php $arr = Locale::parseLocale('sl-Latn-IT-nedis'); if ($arr) { foreach ($arr as $key => $value) { echo "$key : $value , "; } } ?> The above example will output: language : sl , script : Latn , region : IT , variant0 : NEDIS ,
SEE ALSO
locale_compose(3). PHP Documentation Group LOCALE_PARSE(3)
Related Man Pages
collator_sort_with_sort_keys(3) - php
collator_sort(3) - php
locale_compose(3) - php
locale_get_display_region(3) - php
locale_parse(3) - php
Similar Topics in the Unix Linux Community
awk script to split field data
bash Script: Issue with iterating Directory and store into array
Using unix array in sql
Integer array length
Multidimensional array:awk error