In a previous article Downloading Drupal translations with Composer, I presented a Composer extension for downloading Drupal translations.
Now this extension is in the Github drupal-composer https://github.com/drupal-composer/drupal-l10n group.
To download it, you no longer need to add a repository in the composer.json and add a script in the "scripts" section to use it. The following command will suffice:
composer require drupal-composer/drupal-l10n
See for example the commit: https://github.com/FlorentTorregrosa/docker-drupal-project/commit/4921fa71303411a6e908f74d84fc3642bf169794
The command has changed to follow the drupal-scaffold plugin standard. It is now:
compose drupal:l10n
Note: when switching from the old repository to the new repository, you may get an error because internally a class takes one more argument in the constructor. The error will no longer occur after the update.