UserFrosting API

Locale implements LocaleInterface

Locale Class.

Act as a container for a Locale data loaded from filesystem data

Tags
author

Louis Charette

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
mixed

loadConfig()

Loads the config into the class property.

protected loadConfig( ) : void
Tags
throws
FileNotFoundException

if config file not found

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
string

getIdentifier()

Returns the locale identifier.

public getIdentifier( ) : string
Return values
string

getConfig()

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
string

getPluralRule()

Return the number representing the plural rule to use for this locale.

public getPluralRule( ) : int
Return values
int

getRegionalName()

Return the localized version of the locale name.

public getRegionalName( ) : string
Return values
string

Search results