summaryrefslogtreecommitdiff
path: root/inc/functions.php
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2013-07-03 00:25:32 -0400
committerczaks <marcin@6irc.net>2013-07-03 00:25:32 -0400
commit21f6799617677d536fa4e724212e72a1f2625fde (patch)
treeb0d46836a6211e40585db45e9113f3ae02e585af /inc/functions.php
parent2b8d695b49d9202c250d4a34844a1a6ceb2d48d0 (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.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/inc/functions.php b/inc/functions.php
index b3471469..158973e2 100644
--- a/inc/functions.php
+++ b/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