title: Custom Swift Encoder/Decoder for the Strings Resource Format
body: <p>I have been playing around with <code>Codable</code> and reading and writing JSON from and to a file. Now I would like to write a custom <code>Coder</code> that can read and write iOS <code>.strings</code> files. Can anyone help me with this? I found the protocols <code>Encoder</code> and <code>Decoder</code>, but I have no idea what I should implement here:</p>
  
  <pre><code>class StringsEncoder {}
  
  extension StringsEncoder: Encoder {
      var codingPath: [CodingKey?] {
          return []
      }
  
      var userInfo: [CodingUserInfoKey : Any] {
          return [:]
      }
  
      func container&lt;Key&gt;(keyedBy type: Key.Type) -&gt; KeyedEncodingContainer&lt;Key&gt; where Key : CodingKey {
  
      }
  
      func unkeyedContainer() -&gt; UnkeyedEncodingContainer {
  
      }
  
      func singleValueContainer() -&gt; SingleValueEncodingContainer {
  
      }
  }
  
  extension StringsEncoder: Decoder {
      func container&lt;Key&gt;(keyedBy type: Key.Type) throws -&gt; KeyedDecodingContainer&lt;Key&gt; where Key : CodingKey {
  
      }
  
      func unkeyedContainer() throws -&gt; UnkeyedDecodingContainer {
  
      }
  
      func singleValueContainer() throws -&gt; SingleValueDecodingContainer {
  
      }
  }
  </code></pre>