aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/languages.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2012-06-15 18:04:59 -0400
committerCash Costello <cash.costello@gmail.com>2012-06-15 18:04:59 -0400
commit460b47b7cedb7b9af16d8d62e5b7b8b9eadff508 (patch)
tree5d8e9a8866fd952701106c2c5f425b285207f932 /engine/lib/languages.php
parent4c391e8cbdfb7a51392244d3f3ff0af35b1adb88 (diff)
downloadelgg-460b47b7cedb7b9af16d8d62e5b7b8b9eadff508.tar.gz
elgg-460b47b7cedb7b9af16d8d62e5b7b8b9eadff508.tar.bz2
load translations when an exception is thrown before engine boot finishes
Diffstat (limited to 'engine/lib/languages.php')
-rw-r--r--engine/lib/languages.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/engine/lib/languages.php b/engine/lib/languages.php
index e55d5622a..15c48f902 100644
--- a/engine/lib/languages.php
+++ b/engine/lib/languages.php
@@ -34,6 +34,11 @@ function elgg_echo($message_key, $args = array(), $language = "") {
$args = array();
}
+ if (!isset($CONFIG->translations)) {
+ // this means we probably had an exception before translations were initialized
+ register_translations(dirname(dirname(dirname(__FILE__))) . "/languages/");
+ }
+
if (!$CURRENT_LANGUAGE) {
$CURRENT_LANGUAGE = get_language();
}