public function initFSTranslations($language = '') { if (empty($language)) { $language = $this->language; } $translations = parsePO(file_get_contents(dirname(__FILE__) . '/locale/' . $language . '/phplist.po')); $time = filemtime(dirname(__FILE__) . '/locale/' . $language . '/phplist.po'); $this->updateDBtranslations($translations, $time, $language); }
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>i18n po compiler</title> <link rel="stylesheet" type="text/css" href="tools.css" /> </head> <body> <h1>i18n po compiler</h1> <p><?php $files = parseDirectory($OUTPUTPATH, 'po'); foreach ($files as $file) { if (!preg_match("/singapore\\.(admin\\.)?[\\w]+\\.po\$/i", $file)) { continue; } $outfile = preg_replace("/\\.[^\\.]+\$/", ".pmo", $file); if (parsePO($file, $outfile)) { echo "Parsed {$file} to {$outfile}<br />"; } else { echo "Could not parse {$file}<br />"; } } ?> </p> <p>All operations complete. <a href="index.html">Return</a> to tools.</p> </body> </html>