You are here

function language_features_rebuild in Features 7

Same name and namespace in other branches
  1. 7.2 includes/features.locale.inc \language_features_rebuild()

Implements hook_features_rebuild().

1 call to language_features_rebuild()
language_features_revert in includes/features.locale.inc
Implements hook_features_revert().

File

includes/features.locale.inc, line 90
Features hooks for language.

Code

function language_features_rebuild($module) {
  if ($defaults = features_get_default('language', $module)) {
    foreach ($defaults as $key => $language) {
      _features_language_save((object) $language);
    }

    // Set correct language count.
    $enabled_languages = db_select('languages')
      ->condition('enabled', 1)
      ->fields('languages')
      ->execute()
      ->rowCount();
    variable_set('language_count', $enabled_languages);
  }
}