class TranslationsInstaller (View source)

Properties

protected Repository $config
protected FactoryInterface $localFactory
protected ProviderInterface $remoteProvider
protected Filesystem $fs
protected Application $app

Methods

__construct(Repository $config, FactoryInterface $localFactory, ProviderInterface $remoteProvider, Filesystem $fs, Application $app)

No description

installCoreTranslations(string $localeID)

Install a new core locale, or update an existing one.

installPackageTranslations(Package $package, string $localeID)

Install a new locale for a package, or update an existing one.

array
installMissingPackageTranslations(Package $package)

Install missing package translation files.

installTranslations(string $localeID, Package $package = null)

No description

Details

__construct(Repository $config, FactoryInterface $localFactory, ProviderInterface $remoteProvider, Filesystem $fs, Application $app)

Parameters

Repository $config
FactoryInterface $localFactory
ProviderInterface $remoteProvider
Filesystem $fs
Application $app

installCoreTranslations(string $localeID)

Install a new core locale, or update an existing one.

Parameters

string $localeID

Exceptions

Exception

installPackageTranslations(Package $package, string $localeID)

Install a new locale for a package, or update an existing one.

Parameters

Package $package
string $localeID

Exceptions

Exception

array installMissingPackageTranslations(Package $package)

Install missing package translation files.

Parameters

Package $package

Return Value

array array keys are the missing locale IDs, array values are: false (package not translated), true (language file downloaded), \Exception (in case of errors)

private installTranslations(string $localeID, Package $package = null)

Parameters

string $localeID
Package $package

Exceptions

Exception