I have set a central translations directory(sites/all/translations) for my multisite installation profile so that each site does not have to download translations that were already downloaded.
I have set this via global settings file that I am including in the site's settings file, but it did not helped. Then I have added locale.settings.yml config into the profile, still no change. This works always AFTER the site was installed.
In the site installer there is a condition that checks if the config value for the directory exists in the global config variable, it will use that value or if not it will use the site's own translations directory by default.
So I think that during the installation process using config won't work and the only way is to use the global config variable.
So my question is how I can provide this variable to drush's site install command?
I am talking specifically about this: core/includes/install.core.inc:411
// Register the file translation service.
if (isset($GLOBALS['config']['locale.settings']['translation']['path'])) {
$directory = $GLOBALS['config']['locale.settings']['translation']['path'];
}
else {
$directory = $site_path . '/files/translations';
}
$container->set('string_translator.file_translation', new FileTranslation($directory));
$container->get('string_translation')
->addTranslator($container->get('string_translator.file_translation'));