localtable = $table; } /** * Returns a localized string from the table * * @param str Text to localize * * @return str Localized string */ function string($key) { return $key; } /** * Returns a value from the lex table for a specific code * * @param str Lex code * * @return str Localized string */ function getlex($code) { if (isset($this->lextable["$code"])) { return $this->lextable["$code"]; } trigger_error('Lex code `' . $code . '` did not appear in the lex table', E_USER_ERROR); } /** * Sets a value in the lex table for easy access of strings * that are commonly used * * @param str Lex code * @param str Text equiv */ function setlex($code, $value) { if (isset($this->lextable["$code"])) { trigger_error('Cannot set lex `' . $code . '` : value already exists', E_USER_ERROR); } $this->lextable["$code"] = $this->string($value); } } /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>