[TYPO3-ect] tx_lib translate problem (with patch)
Carey O'Shea
carey at internode.on.net
Sat Feb 17 18:33:34 CET 2007
Hello,
Using %%%tx_test2_clients.country.I.0%%% in a template caused these PHP
errors:
Parse error: syntax error, unexpected T_DNUMBER in
typo3conf/ext/lib/class.tx_lib_translator.php(218) : regexp code on line 1
Fatal error: preg_replace() [<a
href='function.preg-replace'>function.preg-replace</a>]: Failed
evaluating code: $this->_getLocalLang(tx_test2_clients.country.I.0)
in typo3conf/ext/lib/class.tx_lib_translator.php on line 218
This was fixed by changing the follow line in class.tx_lib_translator.php:
Index: class.tx_lib_translator.php
===================================================================
--- class.tx_lib_translator.php (revision 4915)
+++ class.tx_lib_translator.php (working copy)
@@ -215,7 +215,7 @@
function _translate($text) {
$this->_loadLocalLang();
$pattern = $this->translationPattern . 'e';
- return preg_replace($pattern,
'$this->_getLocalLang($1)', $text);
+ return preg_replace($pattern,
'$this->_getLocalLang("$1")', $text);
}
}
Regards,
--
Carey O'Shea
More information about the TYPO3-team-extension-coordination
mailing list