TranslatorAdapterFactory
class TranslatorAdapterFactory implements TranslatorAdapterFactoryInterface (View source)
The core translator adapter factory is a wrapper factory that abstracts the translator creation based on the passed locale. By default, a translator instance will be created through the ZendTranslatorAdapterFactory.
If the passed locale is the system's base locale and if translations are NOT enabled for the base locale, a translator instance will be created through the PlainTranslatorAdapterFactory.
Properties
protected Repository | $config | ||
protected TranslatorAdapterFactory | $plainFactory | ||
protected TranslatorAdapterFactory | $zendFactory |
Methods
__construct(Repository $config, TranslatorAdapterFactory $plainFactory, TranslatorAdapterFactory $zendFactory)
No description
createTranslatorAdapter(string $locale)
Creates a translator adapter for the given locale.
shouldTranslateBaseLocale()
No description
Details
__construct(Repository $config, TranslatorAdapterFactory $plainFactory, TranslatorAdapterFactory $zendFactory)
No description
TranslatorAdapterInterface
createTranslatorAdapter(string $locale)
Creates a translator adapter for the given locale.
private
shouldTranslateBaseLocale()
No description