소스 검색

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

Victor De la Rocha 17 년 전
부모
커밋
d6c8268b59
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      classes/themes.class.php

+ 1 - 1
classes/themes.class.php 파일 보기

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
 }