Explorar el Código

Added support for L10n on themes {__('Translate this!')}.

Victor De la Rocha hace 17 años
padre
commit
d6c8268b59
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      classes/themes.class.php

+ 1 - 1
classes/themes.class.php Ver fichero

107
 		preg_match_all($patron,$this->output,$out);
107
 		preg_match_all($patron,$this->output,$out);
108
 
108
 
109
 		foreach($out[1] as $k=>$v){
109
 		foreach($out[1] as $k=>$v){
110
-				$this->output = str_replace("{__('$v')}",$this->l10n->__($v),$this->output);
110
+				$this->output = preg_replace("/{__\((?:'|\")$v(?:'|\")\)}/",__($v),$this->output);
111
 			}
111
 			}
112
 	}
112
 	}
113
 }
113
 }