$this->_bigEndian = false;
$this->_file = @
fopen($filename, 'rb'
);
if (!
$this->_file
) { throw new Zend_Translate_Exception('Error opening translation file \'' .
$filename . '\'.'
);
} if (@
filesize($filename) < 10
) { @
fclose($this->_file
);
throw new Zend_Translate_Exception('\'' .
$filename . '\' is not a gettext file'
);
} // get Endian
$input =
$this->
_readMOData(1
);
if (strtolower(substr(dechex($input[1
]), -8
)) == "950412de"
) { $this->_bigEndian = false;
} else if (strtolower(substr(dechex($input[1
]), -8
)) == "de120495"
) { $this->_bigEndian = true;
} else { @
fclose($this->_file
);
throw new Zend_Translate_Exception('\'' .
$filename . '\' is not a gettext file'
);
} // read revision - not supported for now
$input =
$this->
_readMOData(1
);