IntlCalendar::getKeywordValuesForLocale

(PHP 5 >= 5.5.0, PHP 7, PHP 8, PECL >= 3.0.0a1)

IntlCalendar::getKeywordValuesForLocale โ€” Get set of locale keyword values

่ฏดๆ˜Ž

้ขๅ‘ๅฏน่ฑก้ฃŽๆ ผ

public static IntlCalendar::getKeywordValuesForLocale(string $keyword, string $locale, bool $onlyCommon): IntlIterator|false

่ฟ‡็จ‹ๅŒ–้ฃŽๆ ผ

intlcal_get_keyword_values_for_locale(string $keyword, string $locale, bool $onlyCommon): IntlIterator|false

For a given locale key, get the set of values for that key that would result in a different behavior. For now, only the 'calendar' keyword is supported.

This function requires ICU 4.2 or later.

ๅ‚ๆ•ฐ

keyword

The locale keyword for which relevant values are to be queried. Only 'calendar' is supported.

locale

The locale onto which the keyword/value pair are to be appended.

onlyCommon

Whether to show only the values commonly used for the specified locale.

่ฟ”ๅ›žๅ€ผ

An iterator that yields strings with the locale keyword values ๆˆ–่€…ๅœจๅคฑ่ดฅๆ—ถ่ฟ”ๅ›ž false.

็คบไพ‹

็คบไพ‹ #1 IntlCalendar::getKeyworkValuesForLocale()

<?php
print_r
(
iterator_to_array(
IntlCalendar::getKeywordValuesForLocale(
'calendar', 'fa_IR', true)));
print_r(
iterator_to_array(
IntlCalendar::getKeywordValuesForLocale(
'calendar', 'fa_IR', false)));

ไปฅไธŠ็คบไพ‹ไผš่พ“ๅ‡บ๏ผš

Array
(
    [0] => persian
    [1] => gregorian
    [2] => islamic
    [3] => islamic-civil
)
Array
(
    [0] => persian
    [1] => gregorian
    [2] => islamic
    [3] => islamic-civil
    [4] => japanese
    [5] => buddhist
    [6] => roc
    [7] => hebrew
    [8] => chinese
    [9] => indian
    [10] => coptic
    [11] => ethiopic
    [12] => ethiopic-amete-alem
)

๏ผ‹ๆทปๅŠ ๅค‡ๆณจ

็”จๆˆท่ดก็Œฎ็š„ๅค‡ๆณจ

ๆญค้กต้ขๅฐšๆ— ็”จๆˆท่ดก็Œฎ็š„ๅค‡ๆณจใ€‚
To Top