php8.5
Home/ Manual/ reference / intl/ Locale Subtags

Locale Subtags

Locale::DEFAULT_LOCALEnull Used as locale parameter with the methods of the various locale affected classes, such as NumberFormatter. This constant would make the methods to use default locale.

Predefined Constants

Locale::DEFAULT_LOCALEnull

Used as locale parameter with the methods of the various locale affected classes, such as NumberFormatter. This constant would make the methods to use default locale.

These constants describe the choice of the locale for the getLocale method of different classes.

Locale::ACTUAL_LOCALEint

This is locale the data actually comes from.

Locale::VALID_LOCALEint

This is the most specific locale supported by ICU.

Locale Subtags

These constants define how the Locales are parsed or composed. They should be used as keys in the argument array to locale_compose() and are returned from locale_parse() as keys of the returned associative array.

Locale::LANG_TAGstring

Language subtag

Locale::EXTLANG_TAGstring

Extended language subtag

Locale::SCRIPT_TAGstring

Script subtag

Locale::REGION_TAGstring

Region subtag

Locale::VARIANT_TAGstring

Variant subtag

Locale::GRANDFATHERED_LANG_TAGstring

Grandfathered Language subtag

Locale::PRIVATE_TAGstring

Private subtag

Source: reference/intl/locale-constants.xml · from the official PHP manual (php/doc-en)