$fallback
$fallback : \Aura\Intl\TranslatorInterface
A fallback translator.
Translator to translate the message
$fallback : \Aura\Intl\TranslatorInterface
A fallback translator.
$formatter : \Aura\Intl\FormatterInterface
The formatter to use when translating messages.
$package : \Aura\Intl\Package
The Package containing keys and translations.
__construct(string $locale, \Aura\Intl\Package $package, \Aura\Intl\FormatterInterface $formatter, \Aura\Intl\TranslatorInterface $fallback = null)
Constructor
string | $locale | The locale being used. |
\Aura\Intl\Package | $package | The Package containing keys and translations. |
\Aura\Intl\FormatterInterface | $formatter | A message formatter. |
\Aura\Intl\TranslatorInterface | $fallback | A fallback translator. |
translate(string $key, array $tokens_values = array()) : string
Translates the message indicated by they key, replacing token values along the way.
string | $key | The message key. |
array | $tokens_values | Token values to interpolate into the message. |
The translated message with tokens replaced.
getPackage() : \Aura\Intl\Package
An object of type Package
Loading…