How to install language pack on CLI

Your software
My Mautic version is: 5.1.0
My PHP version is: 8.2.7
My Database type and version is: MariaDB 10.5.18

Your problem
My goal is to set up my local development environment fully automatically. This works this far with Docker + Composer + Mautic console commands + additional configuration parameters in config/local.php. What does not work is to set the configuration parameter “locale” to something other than “en_US” and load the Mautic backend immediately in that language. The reason seems to be that \Mautic\CoreBundle\Helper\LanguageHelper::extractLanguagePackage() is only executed on certain user interactions in the Mautic backend. It would be great to be able to execute this method in a dedicated Mautic console command as well.