From f7d45c390f415f67896dcf71435338cf029f02cc Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Fri, 19 Feb 2010 14:48:26 +0100 Subject: [PATCH] LSsearch : Added translation support for predefinedFilters labels --- public_html/includes/class/class.LSsearch.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/public_html/includes/class/class.LSsearch.php b/public_html/includes/class/class.LSsearch.php index 91722b45..6041a2bf 100644 --- a/public_html/includes/class/class.LSsearch.php +++ b/public_html/includes/class/class.LSsearch.php @@ -978,7 +978,13 @@ class LSsearch { return $this -> _canCopy; } elseif ($key=='predefinedFilters') { - return ((is_array($this -> config['predefinedFilters']))?$this -> config['predefinedFilters']:array()); + $retval=array(); + if (is_array($this -> config['predefinedFilters'])) { + foreach($this -> config['predefinedFilters'] as $filter => $label) { + $retval[$filter]=__($label); + } + } + return $retval; } else { throw new Exception('Incorrect property !');