You are here

administration_language_negotiation.install in Administration Language Negotiation 7

Same filename and directory in other branches
  1. 8 administration_language_negotiation.install

The install page of the administration language negotiation module.

File

administration_language_negotiation.install
View 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');
}