From: Cash Costello Date: Fri, 15 Jun 2012 22:04:59 +0000 (-0400) Subject: load translations when an exception is thrown before engine boot finishes X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=460b47b7cedb7b9af16d8d62e5b7b8b9eadff508;p=lorea%2Felgg.git load translations when an exception is thrown before engine boot finishes --- 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(); }