Changeset 12657
- Timestamp:
- Nov 22, 2011, 10:19:11 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.3/include/template.class.php
r12430 r12657 770 770 771 771 $regex = "~$ldq *\'([^'$]+)\'\|@translate\|~"; 772 $source = preg_replace_callback( $regex, create_function('$m', 'global $lang; return isset($lang[$m[1]]) ? \'{\'.var_export($lang[$m[1]],true).\'|\' : \'$m[0]\';'), $source);772 $source = preg_replace_callback( $regex, create_function('$m', 'global $lang; return isset($lang[$m[1]]) ? \'{\'.var_export($lang[$m[1]],true).\'|\' : $m[0];'), $source); 773 773 774 774 $regex = "~($ldq *assign +var=.+ +value=)\'([^'$]+)\'\|@translate~"; 775 $source = preg_replace_callback( $regex, create_function('$m', 'global $lang; return isset($lang[$m[2]]) ? $m[1].var_export($lang[$m[2]],true) : \'$m[0]\';'), $source);775 $source = preg_replace_callback( $regex, create_function('$m', 'global $lang; return isset($lang[$m[2]]) ? $m[1].var_export($lang[$m[2]],true) : $m[0];'), $source); 776 776 777 777 return $source;
Note: See TracChangeset
for help on using the changeset viewer.