]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
load translations when an exception is thrown before engine boot finishes
authorCash Costello <cash.costello@gmail.com>
Fri, 15 Jun 2012 22:04:59 +0000 (18:04 -0400)
committerCash Costello <cash.costello@gmail.com>
Fri, 15 Jun 2012 22:04:59 +0000 (18:04 -0400)
engine/lib/languages.php

index e55d5622a932a8e56056f55ec85c51938acf554f..15c48f9028ee331c62457d5bfb4a8a60a9354431 100644 (file)
@@ -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();
        }