I'm trying to automate the setup of Drupal multi-site installations as much as possible, we're using each multi-site for a separate country so would like the languages localised for each.
Is there a way to programmatically set the default language? It normally defaults to English. For a Spanish multi-site I would like to set it to Spanish.
The default language seems to be set in SelectLanguageForm.php .Since this happens so early on in the installation process, I can't use hook_form_alter()
because no modules, profiles, or themes would be loaded at that point.
The default language will be defined basing on the subdomain where Drupal is going to be installed.