public function getContent() { $charset = BackendModel::getContainer()->getParameter('kernel.charset'); // create XML $xmlOutput = BackendLocaleModel::createXMLForExport($this->locale); return new Response($xmlOutput, Response::HTTP_OK, ['Content-Disposition' => 'attachment; filename="locale_' . BackendModel::getUTCDate('d-m-Y') . '.xml"', 'Content-Type' => 'application/octet-stream;charset=' . $charset, 'Content-Length' => '' . mb_strlen($xmlOutput)]); }