_locale_import_parse_header
- Versions
- 4.6 – 7
_locale_import_parse_header($header)
Parses a Gettext Portable Object file header
author Jacobo Tarrio
Parameters
$header A string containing the complete header
Return value
An associative array of key-value pairs
Code
includes/locale.inc, line 751
<?php
function _locale_import_parse_header($header) {
$hdr = array();
$lines = explode("\n", $header);
foreach ($lines as $line) {
$line = trim($line);
if ($line) {
list($tag, $contents) = explode(":", $line, 2);
$hdr[trim($tag)] = trim($contents);
}
}
return $hdr;
}
?>Login or register to post comments 