Browse Source

js i18n: finish implementation with addition of the compiled locale strings file to additional javascripts

pull/40/head
czaks 11 years ago
parent
commit
21f6799617
  1. 6
      inc/functions.php

6
inc/functions.php

@ -1244,6 +1244,12 @@ function buildJavascript() {
'uri' => addslashes((!empty($uri) ? $config['uri_stylesheets'] : '') . $uri));
}
// Check if we have translation for the javascripts; if yes, we add it to additional javascripts
list($pure_locale) = explode(".", $config['locale']);
if (file_exists ($jsloc = "inc/locale/".$pure_locale."/LC_MESSAGES/javascript.js")) {
array_unshift($config['additional_javascript'], $jsloc);
}
$script = Element('main.js', array(
'config' => $config,
'stylesheets' => $stylesheets

Loading…
Cancel
Save