Provides missing message behavior for CakePHP internal message formats.
string 'p:' \Aura\Intl\TranslatorInterfaceA fallback translator.
\Aura\Intl\FormatterInterfaceThe formatter to use when translating messages.
stringThe locale being used for translations.
\Aura\Intl\PackageThe Package containing keys and translations.
__construct(mixed $locale, \Aura\Intl\Package $package, \Aura\Intl\FormatterInterface $formatter, \Aura\Intl\TranslatorInterface $fallback)
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 optional A fallback translator.
getMessage(mixed $key)
Gets the message translation by its key.
string $key The message key.
mixedThe message translation string, or false if not found.
getPackage()
An object of type Package
\Aura\Intl\PackageresolveContext(string $key, array $message, array $vars)
Resolve a message's context structure.
string $key The message key being handled.
array $message The message content.
array $vars The variables containing the _context key.
string|arraytranslate(mixed $key, array $tokensValues)
Translates the message formatting any placeholders
string $key The message key.
array $tokensValues optional Token values to interpolate into the message.
stringThe translated message with tokens replaced.
A fallback translator.
\Aura\Intl\TranslatorInterfaceThe formatter to use when translating messages.
\Aura\Intl\FormatterInterfaceThe locale being used for translations.
stringThe Package containing keys and translations.
\Aura\Intl\Package
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.1/class-Cake.I18n.Translator.html