Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In the install_begin_request function there is this code:
// 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'));
which would suggest that changing the translations directory path is possible(changing the global is not possible in any way at this point anyway).
And then in the install_check_translations there is:
// @todo: Make this configurable.
$site_path = \Drupal::service('site.path');
$files_directory = $site_path . '/files';
$translations_directory = $site_path . '/files/translations';
which again makes this impossible.
So in case of multisite setup each new site will ALWAYS download the drupal core translation.
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedivanjaros created an issue. See original summary.
Comment #10
quietone CreditAttribution: quietone as a volunteer commentedThis looks like it a duplicate of a later issue, closing this one because the later one has more discussion.
Comment #12
quietone CreditAttribution: quietone as a volunteer commentedOops, got that wrong.
Closed a duplicate of this issue, adding credit.
Comment #13
quietone CreditAttribution: quietone as a volunteer commentedAnd this seems like a feature request so change category.
Comment #16
mlncn CreditAttribution: mlncn as a volunteer and at Agaric for Drutopia commentedThis is a bug. It also makes installing from configuration where the translations directory has been set to be somewhere else, outside the files directory—which as noted, is allowed, for example, if you want to manage your translations with git (like config) you should be able to set it to
web/profiles/custom/example/translations
. That is also a legitimate thing for a contrib distribution to do, we think.Comment #17
mlncn CreditAttribution: mlncn as a volunteer and at Agaric for Drutopia commentedAs ivanjaros noted the core/includes/install.core.inc file already has a "@todo: Make this configurable." right in it.