PHP 클래스 Neos\Flow\I18n\EelHelper\TranslationHelper

상속: implements Neos\Eel\ProtectedContextAwareInterface
파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

공개 메소드들

메소드 설명
allowsCallOfMethod ( string $methodName ) : boolean All methods are considered safe
id ( string $id ) : TranslationParameterToken Start collection of parameters for translation by id
translate ( string $id, string $originalLabel = null, array $arguments = [], string $source = 'Main', string $package = null, mixed $quantity = null, string $locale = null ) : string Get the translated value for an id or original label
value ( string $value ) : TranslationParameterToken Start collection of parameters for translation by original label

보호된 메소드들

메소드 설명
createTranslationParameterToken ( string $id = null, string $originalLabel = null ) : TranslationParameterToken Create and return a TranslationParameterToken.
translateByExplicitlyPassedOrderedArguments ( string $id, string $originalLabel = null, array $arguments = [], string $source = 'Main', string $package = null, mixed $quantity = null, string $locale = null ) : string Get the translated value for an id or original label
translateByShortHandString ( string $shortHandString ) : string Translate by shorthand string

메소드 상세

allowsCallOfMethod() 공개 메소드

All methods are considered safe
public allowsCallOfMethod ( string $methodName ) : boolean
$methodName string
리턴 boolean

createTranslationParameterToken() 보호된 메소드

Create and return a TranslationParameterToken.
protected createTranslationParameterToken ( string $id = null, string $originalLabel = null ) : TranslationParameterToken
$id string
$originalLabel string
리턴 TranslationParameterToken

id() 공개 메소드

Start collection of parameters for translation by id
public id ( string $id ) : TranslationParameterToken
$id string Id to use for finding translation (trans-unit id in XLIFF)
리턴 TranslationParameterToken

translate() 공개 메소드

If only id is set and contains a translation shorthand string, translate according to that shorthand In all other cases: Replace all placeholders with corresponding values if they exist in the translated label.
public translate ( string $id, string $originalLabel = null, array $arguments = [], string $source = 'Main', string $package = null, mixed $quantity = null, string $locale = null ) : string
$id string Id to use for finding translation (trans-unit id in XLIFF)
$originalLabel string The original translation value (the untranslated source string).
$arguments array Numerically indexed array of values to be inserted into placeholders
$source string Name of file with translations
$package string Target package key. If not set, the current package key will be used
$quantity mixed A number to find plural form for (float or int), NULL to not use plural forms
$locale string An identifier of locale to use (NULL for use the default locale)
리턴 string Translated label or source label / ID key

translateByExplicitlyPassedOrderedArguments() 보호된 메소드

Replace all placeholders with corresponding values if they exist in the translated label.
protected translateByExplicitlyPassedOrderedArguments ( string $id, string $originalLabel = null, array $arguments = [], string $source = 'Main', string $package = null, mixed $quantity = null, string $locale = null ) : string
$id string Id to use for finding translation (trans-unit id in XLIFF)
$originalLabel string The original translation value (the untranslated source string).
$arguments array Numerically indexed array of values to be inserted into placeholders
$source string Name of file with translations
$package string Target package key. If not set, the current package key will be used
$quantity mixed A number to find plural form for (float or int), NULL to not use plural forms
$locale string An identifier of locale to use (NULL for use the default locale)
리턴 string Translated label or source label / ID key

translateByShortHandString() 보호된 메소드

Translate by shorthand string
protected translateByShortHandString ( string $shortHandString ) : string
$shortHandString string (PackageKey:Source:trans-unit-id)
리턴 string Translated label or source label / ID key

value() 공개 메소드

Start collection of parameters for translation by original label
public value ( string $value ) : TranslationParameterToken
$value string
리턴 TranslationParameterToken