PHP Class Tools\Utility\L10n

Forward-port of the 2.x core L10n class to support resolvment of iso2/iso3 letter codes and their language names. TODO: Make locale and localeFallback always iso2-letter-codes (deu => de) as per 3.x convention.
Deprecation: Only for upgrading and matching. Use intl PHP libs directly instead.
Afficher le fichier Open project: dereuromark/cakephp-tools Class Usage Examples

Protected Properties

Свойство Type Description
$_l10nCatalog array holds all information related to a language
$_l10nMap array They are the ones building the path in /APP/Locale/[code]/ The bibliographic codes are aliases.

Méthodes publiques

Méthode Description
__construct ( ) Class constructor
catalog ( string | array | null $language = null ) : array | boolean Attempts to find catalog record for requested language
map ( string | array | null $mixed = null ) : string | array | boolean Attempts to find locale for language, or language for locale

Method Details

__construct() public méthode

Class constructor
public __construct ( )

catalog() public méthode

Attempts to find catalog record for requested language
public catalog ( string | array | null $language = null ) : array | boolean
$language string | array | null String requested language, array of requested languages, or null for whole catalog
Résultat array | boolean array catalog record for requested language, array of catalog records, whole catalog, or false when language doesn't exist

map() public méthode

Attempts to find locale for language, or language for locale
public map ( string | array | null $mixed = null ) : string | array | boolean
$mixed string | array | null 2/3 char string (language/locale), array of those strings, or null
Résultat string | array | boolean string language/locale, array of those values, whole map as an array, or false when language/locale doesn't exist

Property Details

$_l10nCatalog protected_oe property

holds all information related to a language
protected array $_l10nCatalog
Résultat array

$_l10nMap protected_oe property

They are the ones building the path in /APP/Locale/[code]/ The bibliographic codes are aliases.
protected array $_l10nMap
Résultat array