If the locale module is enabled regenerate locale translations.

Paramètres

array $files: List of files that have changed.

array $types: Array with the css and or the js key.

1 call to _advagg_locale_changed_files()
advagg_advagg_changed_files dans ./advagg.advagg.inc
Implements hook_advagg_changed_files().

Fichier

./advagg.advagg.inc, line 593

Code

function _advagg_locale_changed_files(array $files, array $types) {
    // Skip if no js changed.
    if (empty($types['js'])) {
        return;
    }
    $javascript = array();
    foreach ($files as $filename => $meta_data) {
        // Only care about js files.
        $ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
        if ($ext !== 'js') {
            continue;
        }
        $javascript[] = array(
            'type' => 'file',
            'data' => $filename,
        );
    }
    if (!empty($javascript)) {
        $javascript_before = $javascript;
        $language_before = $GLOBALS['language'];
        $language_list = language_list();
        foreach ($language_list as $lang) {
            if ($lang->enabled) {
                $GLOBALS['language'] = $lang;
                $javascript = $javascript_before;
                _advagg_locale_js_alter($javascript);
            }
        }
        $GLOBALS['language'] = $language_before;
    }
}