abstract class AbstractTranslationLoader implements TranslationLoaderInterface (View source)

Abstract translation loader provides general methods needed in most translation loader implementations.

Properties

protected $app

Methods

__construct(Application $app)

No description

loadTranslations(TranslatorAdapterInterface $translator)

Loads the translations from this loader type into the given translator instance.

string[]
getLocaleIDAlternatives(string $localeID)

Get the locale identifier alternatives (eg: 'en_US' gives ['en_US', 'en']).

Details

__construct(Application $app)

No description

Parameters

Application $app

abstract loadTranslations(TranslatorAdapterInterface $translator)

Loads the translations from this loader type into the given translator instance.

The given translator instance should have the correct locale already set for it which defines the loader which translations should be loaded.

Parameters

TranslatorAdapterInterface $translator

protected string[] getLocaleIDAlternatives(string $localeID)

Get the locale identifier alternatives (eg: 'en_US' gives ['en_US', 'en']).

Parameters

string $localeID

Return Value

string[]