translate($text)
34: function translate($text) {
35: if (isset ($this->language)) {
36: if (isset ($this->text[$text])) {
37: return $this->text[$text];
38: } else {
39: $this->text[$text] = $text;
40: $dictionary = fopen(DIR_CONFIG . 'dictionary/' . $this->language . '.php', 'w+');
41: $line = "text as $text => $translated_text) {
43: $line .= ' $text' . "['$text']='$translated_text';n";
44: }
45: $line .= "n?>";
46: fwrite($dictionary, $line);
47: fclose($dictionary);
48: }
49: }
50: return $text;
51: }
File: lib/support/Translator.php, #line 34
