if (! $d->find(true) ){
return;
}
- var_dump($d);exit;
+ $gt = File_Gettext::factory('MO', $filename);
+ $git->fromArray(
+
+ array(
+ 'meta' => array(
+ 'Content-Type' => 'text/plain; charset=utf8',
+ //'Last-Translator' => 'Michael Wallner <mike@iworks.at>',
+ 'PO-Revision-Date' => date('Y-m-d H:iO'),
+ //'Language-Team' => 'German <mail@example.com>',
+ ),
+ 'strings' => array(
+ 'All rights reserved' => 'Alle Rechte vorbehalten',
+ 'Welcome' => 'Willkommen',
+ // ...
+ )
+
+ )
+ $gt->write();
+
+ var_dump($d);exit;
+ /**
+ * fromArray
+ *
+ * Assigns meta info and strings from an array of a structure like that:
+ * <code>
+ * array(
+ * 'meta' => array(
+ * 'Content-Type' => 'text/plain; charset=iso-8859-1',
+ * 'Last-Translator' => 'Michael Wallner <mike@iworks.at>',
+ * 'PO-Revision-Date' => date('Y-m-d H:iO'),
+ * 'Language-Team' => 'German <mail@example.com>',
+ * ),
+ * 'strings' => array(
+ * 'All rights reserved' => 'Alle Rechte vorbehalten',
+ * 'Welcome' => 'Willkommen',
+ * // ...
+ * )
+ * )
+ * </code>
+ */
}