PHP Класс Xinax\LaravelGettext\Translators\Gettext

Наследование: extends BaseTranslator, implements Xinax\LaravelGettext\Translators\TranslatorInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$adapter Framework adapter
$categories Locale categories
$configuration Config container
$domain String
$encoding Current encoding
$fileSystem Xinax\LaravelGettext\FileSystem File system helper
$locale Current locale

Открытые методы

Метод Описание
__construct ( Config $config, Xinax\LaravelGettext\Adapters\AdapterInterface $adapter, FileSystem $fileSystem ) Initializes the gettext module translator
__toString ( ) : mixed Return the current locale
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
translate ( $message ) Translates a message with gettext
translatePlural ( $singular, $plural, $count ) : string Translates a plural message with gettext

Описание методов

__construct() публичный Метод

Initializes the gettext module translator
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() публичный Метод

Return the current locale
public __toString ( ) : mixed
Результат mixed

getEncoding() публичный Метод

Gets the Current encoding.
public getEncoding ( ) : mixed
Результат mixed

getLocale() публичный Метод

Returns the current locale string identifier
public getLocale ( ) : String
Результат String

isLocaleSupported() публичный Метод

Returns a boolean that indicates if $locale is supported by configuration
public isLocaleSupported ( $locale ) : boolean
Результат boolean

setDomain() публичный Метод

Sets the current domain and updates gettext domain application
public setDomain ( String $domain ) : self
$domain String
Результат self

setEncoding() публичный Метод

Sets the Current encoding.
public setEncoding ( mixed $encoding ) : self
$encoding mixed the encoding
Результат self

setLocale() публичный Метод

Sets the current locale code
public setLocale ( $locale )

translate() публичный Метод

Translates a message with gettext
public translate ( $message )
$message

translatePlural() публичный Метод

Translates a plural message with gettext
public translatePlural ( $singular, $plural, $count ) : string
$singular
$plural
$count
Результат string

Описание свойств

$adapter защищенное свойство

Framework adapter
protected $adapter

$categories защищенное свойство

Locale categories
protected $categories

$configuration защищенное свойство

Config container
protected $configuration

$domain защищенное свойство

protected String $domain
Результат String

$encoding защищенное свойство

Current encoding
protected $encoding

$fileSystem защищенное свойство

File system helper
protected FileSystem,Xinax\LaravelGettext $fileSystem
Результат Xinax\LaravelGettext\FileSystem

$locale защищенное свойство

Current locale
protected $locale