Locale implements LocaleInterface
Locale Class.
Act as a container for a Locale data loaded from filesystem data
Tags
Table of Contents
$identifier | string | |
---|---|---|
$configFile | string | |
$config | string[] | |
__construct() | Create locale class. | mixed |
loadConfig() | Loads the config into the class property. | void |
getAuthors() | Returns the list of authors of the locale. | string[] |
getConfigFile() | Returns defined configuration file. | string |
getIdentifier() | Returns the locale identifier. | string |
getConfig() | Return the raw configuration data. | string[] |
getDependentLocales() | Return an array of parent locales. | \UserFrosting\I18n\Locale[] |
getDependentLocalesIdentifier() | Return a list of parent locale identifier (eg. [fr_FR, en_US]). | string[] |
getName() | Return the name of the locale, in English form. | string |
getPluralRule() | Return the number representing the plural rule to use for this locale. | int |
getRegionalName() | Return the localized version of the locale name. | string |
Properties
$identifier
protected
string
$identifier
= ''
$configFile
protected
string
$configFile
= ''
$config
protected
string[]
$config
Methods
__construct()
Create locale class.
public
__construct(
$identifier :
string
[, $configFile :
string|null
= null ]
)
: mixed
Parameters
- $identifier : string
The locale identifier (ie. "en_US")
- $configFile : string|null = null
The path to the locale config file
Return values
mixedloadConfig()
Loads the config into the class property.
protected
loadConfig(
)
: void
Tags
getAuthors()
Returns the list of authors of the locale.
public
getAuthors(
)
: string[]
Return values
string[] —The list of authors
getConfigFile()
Returns defined configuration file.
public
getConfigFile(
)
: string
Return values
stringgetIdentifier()
Returns the locale identifier.
public
getIdentifier(
)
: string
Return values
stringgetConfig()
Return the raw configuration data.
public
getConfig(
)
: string[]
Return values
string[]getDependentLocales()
Return an array of parent locales.
public
getDependentLocales(
)
: \UserFrosting\I18n\Locale[]
Return values
\UserFrosting\I18n\Locale[]getDependentLocalesIdentifier()
Return a list of parent locale identifier (eg. [fr_FR, en_US]).
public
getDependentLocalesIdentifier(
)
: string[]
Return values
string[]getName()
Return the name of the locale, in English form.
public
getName(
)
: string
Return values
stringgetPluralRule()
Return the number representing the plural rule to use for this locale.
public
getPluralRule(
)
: int
Return values
intgetRegionalName()
Return the localized version of the locale name.
public
getRegionalName(
)
: string