PHP 클래스 Xinax\LaravelGettext\Translators\Gettext

상속: extends BaseTranslator, implements Xinax\LaravelGettext\Translators\TranslatorInterface
파일 보기 프로젝트 열기: xinax/laravel-gettext

보호된 프로퍼티들

프로퍼티 타입 설명
$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