title: How to add own translator loader/filetype/"logic" to Symfony 3
body: <p>In my symfony project I want to add mulitple mail templates in my resources folder.</p>
  
  <p>Filepath pattern:</p>
  
  <pre><code>app/Resources/translations/emails/[LOCALE]/[mail-type].html.twig
  </code></pre>
  
  <p>I've got my loader, named <code>MailLoader</code> witch load():</p>
  
  <pre><code>public function load($resource, $locale, $domain = 'messages')
  {
      $messages = [];
      $label = strstr(basename($resource), '.', true);
  
      $messages[$label] = file_get_contents($resource);
  
      $catalogue = new MessageCatalogue($locale);
      $catalogue-&gt;add($messages, $domain);
  
      return $catalogue;
  }
  </code></pre>
  
  <p>I want to use <code>$translator-&gt;trans('mail-type');</code> to get specifc for locale content of file.</p>
  
  <p>It's work when I do it like this:</p>
  
  <pre><code>    $translator = new Translator('pl');
      $translator-&gt;addLoader('mails', new MailLoader());
  
      $finder = new Finder();
      $finder-&gt;files()-&gt;in(__DIR__ . '/../Resources/views/email/pl');//-&gt;name('*.html.twig');
  
      foreach ($finder as $file) {
          $translator-&gt;addResource('mails', $file-&gt;getPath() . '/' . $file-&gt;getFilename(), 'pl');
      }
  
      echo $translator-&gt;trans('order-closed');//Returns file content.
  </code></pre>
  
  <p>But I want to extend Symfony Translator in container to use it everywhere I need. How to do it? </p>
  
  <p>Please, I work wit this soo long. It's my first work with this Symfony Component and... It's made me crazy! >:D</p>