Implements hook_install().
Enable URL language negotiation by default in order to have a basic working system on multilingual sites without needing any preliminary configuration.
function language_install() {
// Add the default language at first so that language_list() returns this in
// language_special_languages().
$default_language = language_save(language_default());
$languages = language_default_locked_languages($default_language->weight);
foreach ($languages as $language) {
language_save($language);
}
// Enable URL language detection for each configurable language type.
require_once DRUPAL_ROOT . '/core/includes/language.inc';
foreach (language_types_get_configurable(FALSE) as $type) {
language_negotiation_set($type, array(
LANGUAGE_NEGOTIATION_URL => 0,
));
}
}