Locale

Locale

Localization & Internationalization Class

Methods

__construct

Construct

Locale::__construct( \Psr\Container\ContainerInterface $container )

setLocale

Set the current i18n code

Locale::setLocale( string $i18ncode )

getLocale

Get the current i18n code

Locale::getLocale( ): string

Return Value: string


setTimezone

Locale::setTimezone( $timezone )

getTimezone

Locale::getTimezone( )

setTextDomain

Set the default domain and load module domains

Locale::setTextDomain( \Gibbon\Gibbon\Contracts\Database\Connection $pdo )

setStringReplacementList

Get and store custom string replacements in session

Locale::setStringReplacementList( \Gibbon\Gibbon\Contracts\Database\Connection $pdo, $forceRefresh = false )

translate

Custom translation function to allow custom string replacement

Locale::translate( $text, $domain = null ): string

Return Value: string Translated Text


Last updated : September 15, 2018 b92362d