You are here

function i18n_string_refresh_enabled_modules in Internationalization 7

Refresh strings for enabled modules

1 call to i18n_string_refresh_enabled_modules()
i18n_string_modules_enabled in i18n_string/i18n_string.module
Implements hook_modules_enabled().

File

i18n_string/i18n_string.admin.inc, line 175
Helper functions for string administration.

Code

function i18n_string_refresh_enabled_modules($modules) {

  // Check if any of the modules has strings to update
  $count = 0;
  foreach ($modules as $module) {
    if ($strings = i18n_string_module_string_list($module)) {
      $count += i18n_string_refresh_string_list($strings);
    }

    // Call module refresh if exists
    module_invoke($module, 'i18n_string_refresh', 'all');
  }
  if ($count) {
    drupal_set_message(format_plural($count, 'Refreshed one string for enabled modules.', 'Refreshed @count strings for the enabled modules.'));
  }
}