aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-12-08 22:12:32 -0500
committercash <cash.costello@gmail.com>2011-12-08 22:12:32 -0500
commit1ebbff44be8bccb87ec8cacee171d9b951ec50f4 (patch)
treefe6e50b397121415f0dbf841a81984447428c30d /engine/lib
parentbe930396dfd7c722d9c90d8987a49823710e6717 (diff)
downloadelgg-1ebbff44be8bccb87ec8cacee171d9b951ec50f4.tar.gz
elgg-1ebbff44be8bccb87ec8cacee171d9b951ec50f4.tar.bz2
Fixes #3181 caching language js on server side with proper headers
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/languages.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/engine/lib/languages.php b/engine/lib/languages.php
index 7607ea3bf..0400843af 100644
--- a/engine/lib/languages.php
+++ b/engine/lib/languages.php
@@ -301,4 +301,15 @@ function get_missing_language_keys($language) {
return false;
}
+/**
+ * Initialize the language library
+ * @access private
+ */
+function elgg_languages_init() {
+ $lang = get_current_language();
+ elgg_register_simplecache_view("cache/js/languages/$lang");
+}
+
+elgg_register_event_handler('init', 'system', 'elgg_languages_init');
+
register_translations(dirname(dirname(dirname(__FILE__))) . "/languages/");