', $Line); if(count($Parts) == 2) { $MsgId = substr(trim($Parts[0]), 1, -1); $MsgStr = trim($Parts[1]); if(substr($MsgStr, -1) == ',') $MsgStr = substr($MsgStr, 0, -1); $MsgStr = substr($MsgStr, 1, -1); $Dictionary[$MsgStr] = ''; } } // Create PO file $Output = array( '# Converted from Dolphin lang file', 'msgid ""', 'msgstr ""', '"MIME-Version: 1.0\n"', '"Content-Type: text/plain; charset=utf-8\n"', '"Content-Transfer-Encoding: 8bit\n"', '', ); foreach($Dictionary as $Word => $Item) { $Word = str_replace("\\'", "'", $Word); $Word = str_replace('"', '\"', $Word); $Output[] = 'msgid "'.$Word.'"'; $Output[] = 'msgstr ""'; $Output[] = ''; } file_put_contents($PoFileName, implode("\n", $Output)); ?>