class TranslatorAdapterFactory implements TranslatorAdapterFactoryInterface (View source)

Provides a factory method to create translator objects for the Laminas translator.

Properties

protected TranslationLoaderRepositoryInterface $translationLoaderRepository
protected LoaderPluginManager|null $loaderPluginManager

Methods

__construct(TranslationLoaderRepositoryInterface $translationLoaderRepository = null, LoaderPluginManager $loaderPluginManager = null)

{@inheritdoc}

createTranslatorAdapter(string $locale)

Creates a translator adapter for the given locale.

Details

__construct(TranslationLoaderRepositoryInterface $translationLoaderRepository = null, LoaderPluginManager $loaderPluginManager = null)

{@inheritdoc}

Parameters

TranslationLoaderRepositoryInterface $translationLoaderRepository
LoaderPluginManager $loaderPluginManager

TranslatorAdapterInterface createTranslatorAdapter(string $locale)

Creates a translator adapter for the given locale.

Parameters

string $locale

Return Value

TranslatorAdapterInterface