0)); } } /** * Implements hook_uninstall(). */ function language_uninstall() { // Clear variables. variable_del('language_default'); Drupal::state()->delete('language_count'); // Clear variables. variable_del('language_types'); variable_del('language_content_type_default'); variable_del('language_content_type_negotiation'); foreach (language_types_get_all() as $type) { variable_del("language_negotiation_$type"); variable_del("language_negotiation_methods_weight_$type"); } // Re-initialize the language system so successive calls to t() and other // functions will not expect languages to be present. drupal_language_initialize(); } /** * Implements hook_enable(). */ function language_enable() { // Update the language count, if the module was disabled before, the // language_count state was forced to 1. language_update_count(); } /** * Implements hook_disable(). */ function language_disable() { // Force the language_count state to be 1, so that the when checking if the // site is multilingual (for example in language_multilingual()), the result // will be FALSE, because the language module is disabled. Drupal::state()->set('language_count', 1); } /** * Implements hook_requirements(). */ function language_requirements($phase) { if ($phase == 'update') { // Load the include files to make constants available for updates. language_negotiation_include(); } }