‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Localization\Locale Class Reference
Inheritance diagram for TYPO3\CMS\Core\Localization\Locale:

Public Member Functions

 __construct (string $locale='en', array $dependencies=[])
 
 getName ()
 
 getLanguageCode ()
 
 isRightToLeftLanguageDirection ()
 
 getLanguageScriptCode ()
 
 getCountryCode ()
 
 posixFormatted ()
 
 getPosixCodeSet ()
 
 getDependencies ()
 
 __toString ()
 

Protected Member Functions

 normalize (string $locale)
 

Protected Attributes

string $locale
 
string $languageCode
 
string $languageScript = null
 
string $countryCode = null
 
string $codeSet = null
 
string $charsetModifier = null
 
const RIGHT_TO_LEFT_LANGUAGE_CODES
 
array $dependencies = []
 

Detailed Description

A representation of language key (based on ISO 639-1 / ISO 639-2)

  • ‪the optional four-letter script code that can follow the language code according to the Unicode ISO 15924 Registry (e.g. Hans in zh_Hans)
  • ‪region / country (based on ISO 3166-1) separated with a "-".

This conforms to IETF - RFC 5646 (see https://datatracker.ietf.org/doc/rfc5646/) in a simplified form.

Definition at line 29 of file Locale.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ __toString()

TYPO3\CMS\Core\Localization\Locale::__toString ( )

Definition at line 177 of file Locale.php.

References TYPO3\CMS\Core\Localization\Locale\$locale.

◆ getCountryCode()

TYPO3\CMS\Core\Localization\Locale::getCountryCode ( )

Definition at line 124 of file Locale.php.

References TYPO3\CMS\Core\Localization\Locale\$countryCode.

◆ getDependencies()

TYPO3\CMS\Core\Localization\Locale::getDependencies ( )

Definition at line 160 of file Locale.php.

References TYPO3\CMS\Core\Localization\Locale\$dependencies.

◆ getLanguageCode()

TYPO3\CMS\Core\Localization\Locale::getLanguageCode ( )

Definition at line 109 of file Locale.php.

References TYPO3\CMS\Core\Localization\Locale\$languageCode.

◆ getLanguageScriptCode()

TYPO3\CMS\Core\Localization\Locale::getLanguageScriptCode ( )

Definition at line 119 of file Locale.php.

References TYPO3\CMS\Core\Localization\Locale\$languageScript.

◆ getName()

TYPO3\CMS\Core\Localization\Locale::getName ( )

Definition at line 104 of file Locale.php.

References TYPO3\CMS\Core\Localization\Locale\$locale.

◆ getPosixCodeSet()

TYPO3\CMS\Core\Localization\Locale::getPosixCodeSet ( )

Definition at line 155 of file Locale.php.

References TYPO3\CMS\Core\Localization\Locale\$codeSet.

◆ isRightToLeftLanguageDirection()

TYPO3\CMS\Core\Localization\Locale::isRightToLeftLanguageDirection ( )

Definition at line 114 of file Locale.php.

◆ normalize()

TYPO3\CMS\Core\Localization\Locale::normalize ( string  $locale)
protected

◆ posixFormatted()

Member Data Documentation

◆ $charsetModifier

string TYPO3\CMS\Core\Localization\Locale::$charsetModifier = null
protected

◆ $codeSet

string TYPO3\CMS\Core\Localization\Locale::$codeSet = null
protected

◆ $countryCode

string TYPO3\CMS\Core\Localization\Locale::$countryCode = null
protected

◆ $dependencies

array TYPO3\CMS\Core\Localization\Locale::$dependencies = []
protected

◆ $languageCode

string TYPO3\CMS\Core\Localization\Locale::$languageCode
protected

◆ $languageScript

string TYPO3\CMS\Core\Localization\Locale::$languageScript = null
protected

◆ $locale

◆ RIGHT_TO_LEFT_LANGUAGE_CODES

const TYPO3\CMS\Core\Localization\Locale::RIGHT_TO_LEFT_LANGUAGE_CODES
protected
Initial value:
= [
'ar',
'arc',
'arz',
'ckb',
'dv',
'fa',
'ha',
'he',
'khw',
'ks',
'ps',
'sd',
'ur',
'uz-AF',
'yi',
]

Definition at line 40 of file Locale.php.