PHP Класс Neos\Flow\I18n\Locale
Objects of this kind conveniently represent locales usually described by
locale identifiers such as de_DE, en_Latin_US etc. The locale identifiers
used are defined in the Unicode Technical Standard #35 (Unicode Locale
Data Markup Language).
Using this class asserts the validity of the used locale and provides you
with some useful methods for getting more information about it.
Please note that this class represents locale identifier with valid syntax,
but it does not assures that represented locale is available (installed) in
current Flow installation. In order to check that, various methods of
\Neos\Flow\I18n\Service class can be used.
Показать файл
Открыть проект
Примеры использования класса
Защищенные свойства (Protected)
Свойство |
Тип |
Описание |
|
$language |
string |
The language identifier - a BCP47, ISO 639-3 or 639-5 code
Like the standard says, we use "mul" to label multilanguage content |
|
$region |
string |
The region identifier - an ISO 3166-1-alpha-2 code or a UN M.49 three digit code
Note: We use "ZZ" for "unknown region" or "global" |
|
$script |
string |
The script identifier - an ISO 15924 code according to BCP47 |
|
$variant |
string |
The optional variant identifier - one of the registered registered variants according to BCP47 |
|
Открытые методы
Описание методов
__construct()
публичный Метод
Constructs this locale object
public __construct ( string $localeIdentifier ) |
$localeIdentifier |
string |
A valid locale identifier according to UTS#35 |
__toString()
публичный Метод
Returns the string identifier of this locale
getLanguage()
публичный Метод
Returns the language defined in this locale
getRegion()
публичный Метод
Returns the region defined in this locale
getScript()
публичный Метод
Returns the script defined in this locale
getVariant()
публичный Метод
Returns the variant defined in this locale
Описание свойств
$language защищенное свойство
The language identifier - a BCP47, ISO 639-3 or 639-5 code
Like the standard says, we use "mul" to label multilanguage content
protected string $language |
Результат |
string |
|
$region защищенное свойство
The region identifier - an ISO 3166-1-alpha-2 code or a UN M.49 three digit code
Note: We use "ZZ" for "unknown region" or "global"
protected string $region |
Результат |
string |
|
$script защищенное свойство
The script identifier - an ISO 15924 code according to BCP47
protected string $script |
Результат |
string |
|
$variant защищенное свойство
The optional variant identifier - one of the registered registered variants according to BCP47
protected string $variant |
Результат |
string |
|