administration_language_negotiation.install in Administration Language Negotiation 7
Same filename and directory in other branches
The install page of the administration language negotiation module.
File
administration_language_negotiation.installView source
<?php
/**
* @file
* The install page of the administration language negotiation module.
*/
/**
* Implements hook_install().
*/
function administration_language_negotiation_install() {
if (empty(variable_get('administration_language_negotiation_paths', array()))) {
variable_set('administration_language_negotiation_paths', array(
'*admin',
'*admin/*',
'*node/*/edit*',
'*node/*/translate*',
'*admin_menu/*',
'/*/admin/*',
'/*/node/*/edit',
'/*/node/*/translate',
'/*/admin_menu/*',
));
}
if (empty(variable_get('administration_language_negotiation_default', NULL))) {
$language_default = language_default();
variable_set('administration_language_negotiation_default', $language_default->language);
}
}
/**
* Implements hook_uninstall().
*/
function administration_language_negotiation_uninstall() {
variable_del('administration_language_negotiation_paths');
variable_del('administration_language_negotiation_default');
}
Functions
Name | Description |
---|---|
administration_language_negotiation_install | Implements hook_install(). |
administration_language_negotiation_uninstall | Implements hook_uninstall(). |