LSsearch : Added translation support for predefinedFilters labels
authorBenjamin Renard <brenard@easter-eggs.com>
Fri, 19 Feb 2010 13:48:26 +0000 (14:48 +0100)
committerBenjamin Renard <brenard@easter-eggs.com>
Fri, 19 Feb 2010 13:48:26 +0000 (14:48 +0100)
public_html/includes/class/class.LSsearch.php

index 91722b4..6041a2b 100644 (file)
@@ -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 !');