Search Results

  1. Gets the region for the input locale locale_get_region does no validation of whether the region exists, but just extracts the text that looks like it can be the region part of the locale, and formats it as uppercase. It doesn't even have to be a 2-character code, but can be an invalid 3-character one.

  2. Simple usage example of `Locale::getRegion ()`. Locale::getRegion is a PHP function that retrieves the region for a specified input locale. It returns the region code, allowing you to determine the country or geographic area associated with a particular locale. This function is useful in internationalization projects or any task that requires working with multilingual data.

  3. Locale::getRegion -- locale_get_region — Gets the region for the input locale

  4. Mar 27, 2026 · The Locale class (and related procedural functions) are used to interact with locale identifiers--to verify that an ID is well-formed, valid, etc. The extensions used by CLDR in UAX #35 (and inherited by ICU) are valid and used wherever they would be in ICU normally. Locales cannot be instantiated as objects.

  5. Return Values The region subtag for the locale or null if not present

  6. PHP Manual Function Reference Human Language and Character Encoding Support intl Locale

  7. The Locale class Introduction A "Locale" is an identifier used to get language, culture, or regionally-specific behavior from an API. PHP locales are organized and identified the same way that the CLDR locales used by ICU (and many vendors of Unix-like operating systems, the Mac, Java, and so forth) use.