PHP Class Pagekit\Intl\IntlModule

Inheritance: extends Pagekit\Module\Module
Show file Open project: pagekit/pagekit

Public Methods

Method Description
getAvailableLanguages ( ) : array Gets the system's available languages.
getContinents ( string $locale = null ) : array Gets the continents list.
getCountries ( string $locale = null ) : array Gets the countries list.
getFormats ( string $locale = null ) : array | null Gets the locales formats data.
getLanguages ( string $locale = null ) : array | null Gets the languages list.
getLocale ( ) : string Gets the current locale id.
getLocaleTag ( ) : string Gets the current locale tag.
getSubContinents ( string $locale = null ) : array Gets the subcontinents list.
getTerritories ( string $locale = null ) : array | null Gets the territories list.
loadLocale ( string $locale, Symfony\Component\Translation\TranslatorInterface $translator = null ) Loads language files.
main ( Pagekit\Application $app )
setLocale ( string $locale ) Sets the current locale id.

Protected Methods

Method Description
getData ( string $name, string | null $locale = null ) : array | null
getGeneric ( string $name ) : array | null
getTerritoryContainment ( $level = 1, $locale = null )
parse ( string $file ) : array | null

Method Details

getAvailableLanguages() public method

Gets the system's available languages.
public getAvailableLanguages ( ) : array
return array

getContinents() public method

Gets the continents list.
public getContinents ( string $locale = null ) : array
$locale string
return array

getCountries() public method

Gets the countries list.
public getCountries ( string $locale = null ) : array
$locale string
return array

getData() protected method

protected getData ( string $name, string | null $locale = null ) : array | null
$name string
$locale string | null
return array | null

getFormats() public method

Gets the locales formats data.
public getFormats ( string $locale = null ) : array | null
$locale string
return array | null

getGeneric() protected method

protected getGeneric ( string $name ) : array | null
$name string
return array | null

getLanguages() public method

Gets the languages list.
public getLanguages ( string $locale = null ) : array | null
$locale string
return array | null

getLocale() public method

Gets the current locale id.
public getLocale ( ) : string
return string

getLocaleTag() public method

Gets the current locale tag.
public getLocaleTag ( ) : string
return string

getSubContinents() public method

Gets the subcontinents list.
public getSubContinents ( string $locale = null ) : array
$locale string
return array

getTerritories() public method

Gets the territories list.
public getTerritories ( string $locale = null ) : array | null
$locale string
return array | null

getTerritoryContainment() protected method

protected getTerritoryContainment ( $level = 1, $locale = null )

loadLocale() public method

Loads language files.
public loadLocale ( string $locale, Symfony\Component\Translation\TranslatorInterface $translator = null )
$locale string
$translator Symfony\Component\Translation\TranslatorInterface

main() public method

public main ( Pagekit\Application $app )
$app Pagekit\Application

parse() protected method

protected parse ( string $file ) : array | null
$file string
return array | null

setLocale() public method

Sets the current locale id.
public setLocale ( string $locale )
$locale string