From 43169536219b92bbc7c798ab5e8527230bad5e63 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 24 Sep 2005 22:17:56 +0000 Subject: [PATCH] Support for the new localize system; I don't think that this breaks anything --- template.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/template.php b/template.php index 64b6661..4ad3e5a 100644 --- a/template.php +++ b/template.php @@ -68,14 +68,14 @@ class DB_Template * @var str * @see _parse_phrases() */ - var $langcall = 'fetch_phrase'; + var $langcall = '$_isso->lang->string'; /** * The name of the function phrases are sprintf() parsed with * @var str * @see _parse_phrases() */ - var $langconst = 'construct_phrase'; + var $langconst = 'sprintf'; /** * Array of pre-compiled templates that are stored to decrease server load @@ -386,14 +386,14 @@ class DB_Template function _parse_phrases($template) { $tag_start = 'langcall . '(\'$1\') . "', $template); + $template = preg_replace('#\{@\\\"(.*?)\\\"\}#i', '" . ' . $this->langcall . '(\'$1\') . "', $template); while (1) { @@ -443,7 +443,7 @@ class DB_Template $phrase_name = preg_replace('#(.*?)#i', '$2', $phrase_bunch); // Wrap the parsed data into the build function - $function_wrap = '" . ' . $this->langconst . '(\'' . $phrase_name . '\', "' . implode('", "', $arglist) . '") . "'; + $function_wrap = '" . ' . $this->langconst . '("' . $phrase_name . '", "' . implode('", "', $arglist) . '") . "'; // Replace the fully-parsed string back into the template $template = substr_replace($template, $function_wrap, $location_start, $location_end + strlen($tag_end) - $location_start); -- 2.43.5