PHP 클래스 Symfony\Component\Translation\Translator

저자: Fabien Potencier ([email protected])
상속: implements Symfony\Component\Translation\TranslatorInterface
파일 보기 프로젝트 열기: pmjones/php-framework-benchmarks 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$catalogues
$locale

공개 메소드들

메소드 설명
__construct ( string $locale, Symfony\Component\Translation\MessageSelector $selector ) Constructor.
addLoader ( string $format, Symfony\Component\Translation\Loader\LoaderInterface $loader ) Adds a Loader.
addResource ( string $format, mixed $resource, string $locale, string $domain = 'messages' ) Adds a Resource.
getLocale ( )
setFallbackLocale ( string $locale ) Sets the fallback locale.
setLocale ( $locale )
trans ( $id, array $parameters = [], $domain = 'messages', $locale = null )
transChoice ( $id, $number, array $parameters = [], $domain = 'messages', $locale = null )

보호된 메소드들

메소드 설명
loadCatalogue ( $locale )

비공개 메소드들

메소드 설명
optimizeCatalogue ( $locale )

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( string $locale, Symfony\Component\Translation\MessageSelector $selector )
$locale string The locale
$selector Symfony\Component\Translation\MessageSelector The message selector for pluralization

addLoader() 공개 메소드

Adds a Loader.
public addLoader ( string $format, Symfony\Component\Translation\Loader\LoaderInterface $loader )
$format string The name of the loader (@see addResource())
$loader Symfony\Component\Translation\Loader\LoaderInterface A LoaderInterface instance

addResource() 공개 메소드

Adds a Resource.
public addResource ( string $format, mixed $resource, string $locale, string $domain = 'messages' )
$format string The name of the loader (@see addLoader())
$resource mixed The resource name
$locale string The locale
$domain string The domain

getLocale() 공개 메소드

public getLocale ( )

loadCatalogue() 보호된 메소드

protected loadCatalogue ( $locale )

setFallbackLocale() 공개 메소드

Sets the fallback locale.
public setFallbackLocale ( string $locale )
$locale string The fallback locale

setLocale() 공개 메소드

public setLocale ( $locale )

trans() 공개 메소드

public trans ( $id, array $parameters = [], $domain = 'messages', $locale = null )
$parameters array

transChoice() 공개 메소드

public transChoice ( $id, $number, array $parameters = [], $domain = 'messages', $locale = null )
$parameters array

프로퍼티 상세

$catalogues 보호되어 있는 프로퍼티

protected $catalogues

$locale 보호되어 있는 프로퍼티

protected $locale