diff --git a/core/lib/Drupal/Core/Gettext/Writer.php b/core/lib/Drupal/Core/Gettext/Writer.php
new file mode 100644
index 0000000..a5cde2f
--- /dev/null
+++ b/core/lib/Drupal/Core/Gettext/Writer.php
@@ -0,0 +1,77 @@
+<?php
+
+/**
+ * @file
+ * Definition of Writer.
+ */
+
+namespace Drupal\Core\Gettext;
+
+use Exception;
+
+/**
+ * Defines a Gettext file writer.
+ */
+class Writer {
+
+  /**
+   * Generate a Gettext Portable Object file based on provided data sources.
+   *
+   * @param $header
+   *   Associative array with information for the header. The following keys
+   *   are supported:
+   *   - 'info': Lead information for the header. Will be output as comments.
+   *   - 'plurals': Full plural formula with number of plurals.
+   * @param $stringIterator
+   *   Object implementing the Iterator interface to provide strings to
+   *   include in the export.
+   *
+   *  @return
+   *    Gettext .po file generated for output.
+   */
+  function write(Array $header, Iterator $stringIterator) {
+
+    $output = '';
+    if (!empty($header['lead'])) {
+      // Start out with lead comments if available.
+      $output = '# ' . join("\n# ", $header['lead']) . "#\n";
+    }
+
+    // Add the actual header information.
+    $output .= "msgid \"\"\n";
+    $output .= "msgstr \"\"\n";
+    $output .= "\"POT-Creation-Date: " . date("Y-m-d H:iO") . "\\n\"\n";
+    $output .= "\"PO-Revision-Date: " . date("Y-m-d H:iO") . "\\n\"\n";
+    $output .= "\"MIME-Version: 1.0\\n\"\n";
+    $output .= "\"Content-Type: text/plain; charset=utf-8\\n\"\n";
+    $output .= "\"Content-Transfer-Encoding: 8bit\\n\"\n";
+    $output .= "\"Plural-Forms: " . $header['plurals'] . "\\n\"\n";
+
+
+
+  }
+
+  /**
+   * Formats a string for output on multiple lines.
+   */
+  private function formatString($string) {
+    // Escape characters for processing.
+    $string = addcslashes($string, "\0..\37\\\"");
+
+    // Always include a line break after the explicit \n line breaks from
+    // the source string. Otherwise wrap at 70 chars to accommodate the extra
+    // format overhead too.
+    $parts = explode("\n", wordwrap(str_replace('\n', "\\n\n", $string), 70));
+
+    // Multiline string should be exported starting with a "" and newline to
+    // have all lines aligned on the same column.
+    if (count($parts) > 1) {
+      return "\"\"\n\"" . implode("\"\n\"", $parts) . "\"\n";
+    }
+    // Single line strings are output on the same line.
+    else {
+      return "\"$parts[0]\"\n";
+    }
+  }
+
+}
\ No newline at end of file
