/**
  * @author Krzysztof Bednarczyk
  * @param Language|null $language
  * @return $this|LanguageManager
  */
 public function clearTranslationCache(Language $language = null)
 {
     $cacheDir = $this->translator->getOptions()['cache_dir'];
     if (!file_exists($cacheDir)) {
         return $this;
     }
     $finder = (new \Symfony\Component\Finder\Finder())->in($cacheDir);
     if ($language) {
         $finder = $finder->contains(".{$language->getLocale()}.");
     }
     /** @var \SplFileInfo $file */
     foreach ($finder->files() as $file) {
         @unlink($file->getRealPath());
     }
     if ($language && $language->getAlias()) {
         return $this->clearTranslationCache($language->getAlias());
     }
     return $this;
 }