--- a/includes/locale.inc +++ b/includes/locale.inc @@ -1484,8 +1484,15 @@ // actual file. $parsed_url = drupal_parse_url($filepath); $filepath = $parsed_url['path']; - // Load the JavaScript file. - $file = file_get_contents($filepath); + + // Load the JavaScript file + // Trough drupal_http_request if remote + if(preg_match('/^(http|https|proxy)\:\/\//i',$filepath)) { + $file = drupal_http_request($filepath)->data; + // Or trough the usual way + } else { + $file = file_get_contents($filepath); + } // Match all calls to Drupal.t() in an array. // Note: \s also matches newlines with the 's' modifier.