Translator

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

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>