PHP Interface Xinax\LaravelGettext\Translators\TranslatorInterface

Afficher le fichier Open project: xinax/laravel-gettext Interface Usage Examples

Méthodes publiques

Méthode Description
__construct ( Config $config, Xinax\LaravelGettext\Adapters\AdapterInterface $adapter, FileSystem $fileSystem ) TranslatorInterface constructor.
__toString ( ) : mixed Return the current locale
getDomain ( ) : String Returns the current domain
getEncoding ( ) : mixed Gets the Current encoding.
getLocale ( ) : String Returns the current locale string identifier
isLocaleSupported ( $locale ) : boolean Returns a boolean that indicates if $locale is supported by configuration
setDomain ( String $domain ) : self Sets the current domain and updates gettext domain application
setEncoding ( mixed $encoding ) : self Sets the Current encoding.
setLocale ( $locale ) Sets the current locale code
supportedLocales ( ) : array Returns supported locales
translate ( $message ) : string Translates a single message
translatePlural ( $singular, $plural, $count ) : mixed Translates a plural string

Method Details

__construct() public méthode

TranslatorInterface constructor.
public __construct ( Config $config, Xinax\LaravelGettext\Adapters\AdapterInterface $adapter, FileSystem $fileSystem )
$config Xinax\LaravelGettext\Config\Models\Config
$adapter Xinax\LaravelGettext\Adapters\AdapterInterface
$fileSystem Xinax\LaravelGettext\FileSystem

__toString() public méthode

Return the current locale
public __toString ( ) : mixed
Résultat mixed

getDomain() public méthode

Returns the current domain
public getDomain ( ) : String
Résultat String

getEncoding() public méthode

Gets the Current encoding.
public getEncoding ( ) : mixed
Résultat mixed

getLocale() public méthode

Returns the current locale string identifier
public getLocale ( ) : String
Résultat String

isLocaleSupported() public méthode

Returns a boolean that indicates if $locale is supported by configuration
public isLocaleSupported ( $locale ) : boolean
Résultat boolean

setDomain() public méthode

Sets the current domain and updates gettext domain application
public setDomain ( String $domain ) : self
$domain String
Résultat self

setEncoding() public méthode

Sets the Current encoding.
public setEncoding ( mixed $encoding ) : self
$encoding mixed the encoding
Résultat self

setLocale() public méthode

Sets the current locale code
public setLocale ( $locale )

supportedLocales() public méthode

Returns supported locales
public supportedLocales ( ) : array
Résultat array

translate() public méthode

Translates a single message
public translate ( $message ) : string
$message
Résultat string

translatePlural() public méthode

Translates a plural string
public translatePlural ( $singular, $plural, $count ) : mixed
$singular
$plural
$count
Résultat mixed