diff options
| author | czaks <marcin@6irc.net> | 2013-07-03 00:25:32 -0400 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-07-31 04:57:50 -0400 |
| commit | 67db0a878a033d98a7daab578a7be8b70dc85b64 (patch) | |
| tree | 9509692369f7576788255e2c6cad6de069c475fc /inc/functions.php | |
| parent | 3f98522ff2cb6cc90b6f7e1285b27b4ba374eb9c (diff) | |
js i18n: finish implementation with addition of the compiled locale strings file to additional javascripts
Diffstat (limited to 'inc/functions.php')
| -rw-r--r-- | inc/functions.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/inc/functions.php b/inc/functions.php index 783663e7..d904e1a2 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1277,6 +1277,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 |
