Parses the file.
Source
protected function parse_file() {
$this->parsed = true;
$result = include $this->file;
if ( ! $result || ! is_array( $result ) ) {
$this->error = 'Invalid data';
return;
}
if ( isset( $result['messages'] ) && is_array( $result['messages'] ) ) {
foreach ( $result['messages'] as $original => $translation ) {
$this->entries[ (string) $original ] = $translation;
}
unset( $result['messages'] );
}
$this->headers = array_change_key_case( $result );
}
Changelog
Version | Description |
---|---|
6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.