Query: locale_filter_matches
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
LOCALE_FILTER_MATCHES(3) 1 LOCALE_FILTER_MATCHES(3) Locale::filterMatches - Checks if a language tag filter matches with locale Object oriented styleSYNOPSISpublicstatic bool Locale::filterMatches (string $langtag, string $locale, [bool $canonicalize = false])DESCRIPTIONProcedural style bool locale_filter_matches (string $langtag, string $locale, [bool $canonicalize = false]) Checks if a $langtag filter matches with $locale according to RFC 4647's basic filtering algorithmPARAMETERSo $langtag - The language tag to check o $locale - The language range to check against o $canonicalize - If true, the arguments will be converted to canonical form before matching.RETURN VALUESTRUE if $locale matches $langtag FALSE otherwise.EXAMPLESExample #1 locale_filter_matches(3) example <?php echo (locale_filter_matches('de-DEVA','de-DE', false)) ? "Matches" : "Does not match"; echo '; '; echo (locale_filter_matches('de-DE_1996','de-DE', false)) ? "Matches" : "Does not match"; ?> Example #2 OO example <?php echo (Locale::filterMatches('de-DEVA','de-DE', false)) ? "Matches" : "Does not match"; echo '; '; echo (Locale::filterMatches('de-DE-1996','de-DE', false)) ? "Matches" : "Does not match"; ?> The above example will output: Does not match; MatchesSEE ALSOlocale_lookup(3). PHP Documentation Group LOCALE_FILTER_MATCHES(3)
Related Man Pages |
---|
is_int(3) - php |
locale_get_display_variant(3) - php |
datefmt_get_locale(3) - php |
is_string(3) - php |
locale_get_display_language(3) - php |
Similar Topics in the Unix Linux Community |
---|
filtering with find command... |