Method | Description | |
---|---|---|
allowsCallOfMethod ( string $methodName ) : boolean | All methods are considered safe | |
id ( string $id ) : |
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 ) : |
Start collection of parameters for translation by original label |
Method | Description | |
---|---|---|
createTranslationParameterToken ( string $id = null, string $originalLabel = null ) : |
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 |
public allowsCallOfMethod ( string $methodName ) : boolean | ||
$methodName | string | |
return | boolean |
protected createTranslationParameterToken ( string $id = null, string $originalLabel = null ) : |
||
$id | string | |
$originalLabel | string | |
return |
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) |
return | string | Translated label or source label / ID key |
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) |
return | string | Translated label or source label / ID key |
protected translateByShortHandString ( string $shortHandString ) : string | ||
$shortHandString | string | (PackageKey:Source:trans-unit-id) |
return | string | Translated label or source label / ID key |