Helper utility to interact with Locales.
More...
|
static | get_locale (int $category=LC_ALL) |
| Get the current locale.
|
|
static | set_locale (int $category=LC_ALL, string $locale='0') |
| Wrap for the native PHP function setlocale().
|
|
static | standardise_locale (string $locale) |
| Standardise a string-based locale, removing any deprecated locale categories and ordering it.
|
|
Helper utility to interact with Locales.
- Copyright
- 2024 Andrew Lyons andre.nosp@m.w@ni.nosp@m.cols..nosp@m.co.u.nosp@m.k
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ get_locale()
static core\locale::get_locale |
( |
int | $category = LC_ALL | ) |
|
|
static |
Get the current locale.
- Parameters
-
- Return values
-
◆ set_locale()
static core\locale::set_locale |
( |
int | $category = LC_ALL, |
|
|
string | $locale = '0' ) |
|
static |
Wrap for the native PHP function setlocale().
- Parameters
-
int | $category | Specifying the category of the functions affected by the locale setting. |
string | $locale | E.g.: en_AU.utf8, en_GB.utf8, es_ES.utf8, fr_FR.utf8, de_DE.utf8. |
- Return values
-
string|false | Returns the new current locale, or FALSE on error. |
◆ standardise_locale()
static core\locale::standardise_locale |
( |
string | $locale | ) |
|
|
static |
Standardise a string-based locale, removing any deprecated locale categories and ordering it.
- Parameters
-
- Return values
-
The documentation for this class was generated from the following file: