_translate[$locale])) { $this->_translate[$locale] = array(); } $this->_file = @fopen($filename, 'rb'); if (!$this->_file) { throw new Zend_Translate_Exception('Error opening translation file \'' . $filename . '\'.'); } while(!feof($this->_file)) { $content = fgets($this->_file); $content = explode(";", $content); // # marks a comment in the translation source if ((!is_array($content) and (substr(trim($content), 0, 1) == "#")) or (is_array($content) and (substr(trim($content[0]), 0, 1) == "#"))) { continue; } if (!empty($content[1])) { $this->_translate[$locale][$content[0]] = substr($content[1], 0, -2); } } } /** * returns the adapters name * * @return string */ public function toString() { return "Csv"; } }