0)); } // Update the language count. language_update_count(); } /** * Implements hook_uninstall(). */ function language_uninstall() { // Clear variables. variable_del('language_default'); \Drupal::state()->delete('language_count'); // Clear variables. variable_del('language_types'); 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(); // Force the language_count state to be 1, so that when checking if the // site is multilingual (for example in language_multilingual()), the result // will be FALSE, because the language module is not installed. \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(); } }