aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/languages.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/engine/lib/languages.php b/engine/lib/languages.php
index 390147100..ca1711380 100644
--- a/engine/lib/languages.php
+++ b/engine/lib/languages.php
@@ -104,8 +104,10 @@
function elgg_echo($message_key, $language = "") {
global $CONFIG;
-
- $language = get_language();
+
+ static $CURRENT_LANGUAGE;
+ if ((!$CURRENT_LANGUAGE) && (!$language))
+ $CURRENT_LANGUAGE = $language = get_language();
if (isset($CONFIG->translations[$language][$message_key])) {
return $CONFIG->translations[$language][$message_key];