class Locale extends Locale
Provides access to locale-related data.
static | setDefaultFallback(string|null $locale) Sets the default fallback locale. | |
static string|null | getDefaultFallback() Returns the default fallback locale. | |
static string|null | getFallback(string $locale) Returns the fallback locale for a given locale. |
Sets the default fallback locale.
The default fallback locale is used as fallback for locales that have no fallback otherwise.
string|null | $locale | The default fallback locale |
getFallback() |
Returns the default fallback locale.
string|null | The default fallback locale |
setDefaultFallback() | |
getFallback() |
Returns the fallback locale for a given locale.
For example, the fallback of "fr_FR" is "fr". The fallback of "fr" is the default fallback locale configured with {@link setDefaultFallback()}. The default fallback locale has no fallback.
string | $locale | The ICU locale code to find the fallback for |
string|null | The ICU locale code of the fallback locale, or null if no fallback exists |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Intl/Locale.html