aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-03-03 15:55:54 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-03-03 15:55:54 +0000
commit7702c81525fd1c85b1369e88de5a72ef1f812c1f (patch)
tree5b884af247691bda2afebffd595f485bb554e416 /engine/lib
parent502c3f2804fd4987adaf9abbeeff5d2a5be2fec2 (diff)
downloadelgg-7702c81525fd1c85b1369e88de5a72ef1f812c1f.tar.gz
elgg-7702c81525fd1c85b1369e88de5a72ef1f812c1f.tar.bz2
Current language now cached per process in elgg_echo.
git-svn-id: https://code.elgg.org/elgg/trunk@3039 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-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];