From 16e38ed24f8b222a41b45fdefab21a5ab1e4f380 Mon Sep 17 00:00:00 2001 From: ceb Date: Fri, 18 Oct 2002 22:53:12 +0000 Subject: [PATCH] fix wrong user lang setting --- phpgwapi/inc/class.translation_sql.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.translation_sql.inc.php b/phpgwapi/inc/class.translation_sql.inc.php index 03a731ae46..9e7ba79449 100644 --- a/phpgwapi/inc/class.translation_sql.inc.php +++ b/phpgwapi/inc/class.translation_sql.inc.php @@ -28,7 +28,7 @@ class translation { var $lang = array(); - var $userlang = 'en'; + var $userlang = ''; var $currentapp = ''; var $loaded = False; var $translator_helper = '*'; @@ -56,6 +56,11 @@ */ function load_langs() { + if($this->userlang == '') + { + $this->userlang = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] ? + $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] : 'en'; + } $sql = "SELECT message_id,content FROM phpgw_lang WHERE lang LIKE '" . $this->userlang . "' AND (app_name LIKE '" . $this->currentapp . "' OR app_name LIKE 'common' OR app_name LIKE 'all') ORDER BY app_name ";