diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-06-15 18:04:59 -0400 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-06-15 18:04:59 -0400 |
commit | 460b47b7cedb7b9af16d8d62e5b7b8b9eadff508 (patch) | |
tree | 5d8e9a8866fd952701106c2c5f425b285207f932 /engine | |
parent | 4c391e8cbdfb7a51392244d3f3ff0af35b1adb88 (diff) | |
download | elgg-460b47b7cedb7b9af16d8d62e5b7b8b9eadff508.tar.gz elgg-460b47b7cedb7b9af16d8d62e5b7b8b9eadff508.tar.bz2 |
load translations when an exception is thrown before engine boot finishes
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/languages.php | 5 |
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(); } |