function advagg_locale_js_add_translations in Advanced CSS/JS Aggregation 7.2
Only the alter part of locale_js_alter(), not the parsing part.
Parameters
array $javascript: An array with all JavaScript code. Defaults to the default JavaScript array for the given scope.
string $dir: String pointing to the public locale_js_directory.
1 call to advagg_locale_js_add_translations()
- _advagg_locale_js_alter in ./
advagg.module - Implements hook_js_alter().
File
- ./
advagg.module, line 1493 - Advanced CSS/JS aggregation module.
Code
function advagg_locale_js_add_translations(array &$javascript, $dir) {
// Add the translation JavaScript file to the page.
if (!empty($GLOBALS['language']->javascript)) {
// Add the translation JavaScript file to the page.
$file = $dir . '/' . $GLOBALS['language']->language . '_' . $GLOBALS['language']->javascript . '.js';
$javascript[$file] = drupal_js_defaults($file);
}
}