Provides missing message behavior for CakePHP internal message formats.
string
'p:'
\Aura\Intl\TranslatorInterface
A fallback translator.
\Aura\Intl\FormatterInterface
The formatter to use when translating messages.
string
The locale being used for translations.
\Aura\Intl\Package
The 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.
mixed
The message translation string, or false if not found.
getPackage()
An object of type Package
\Aura\Intl\Package
resolveContext(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|array
translate(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.
string
The translated message with tokens replaced.
A fallback translator.
\Aura\Intl\TranslatorInterface
The formatter to use when translating messages.
\Aura\Intl\FormatterInterface
The locale being used for translations.
string
The 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