\Aura\IntlTranslatorFactory

Factory to create Translator objects.

Summary

Methods
Properties
Constants
newInstance()
No public properties found
No constants found
No protected methods found
$class
N/A
No private methods found
No private properties found
N/A

Properties

$class

$class : string

The class to use for new instances.

Type

string

Methods

newInstance()

newInstance(string  $locale, \Aura\Intl\Package  $package, \Aura\Intl\FormatterInterface  $formatter, \Aura\Intl\TranslatorInterface  $fallback = null) : \Aura\Intl\Translator

Returns a new Translator.

Parameters

string $locale

The locale code for the translator.

\Aura\Intl\Package $package

The localized package for the translator.

\Aura\Intl\FormatterInterface $formatter

The formatter to use for interpolating token values.

\Aura\Intl\TranslatorInterface $fallback

A fallback translator to use, if any.

Returns

\Aura\Intl\Translator