i18nService = $i18nService; } /** * Attach the language file to javascript * * @todo refactor to remove user timezone and timeformat and move to user settings * * @param array $params or body of the request. * * @throws \Exception */ public function get(array $params): Response { $response = new Response( $this->i18nService->buildJsDictionary(), 200 ); $response->headers->set('Content-Type', 'application/javascript'); $response->headers->set('Pragma', 'public'); // Disable cache for this file since datetime format settings is stored in here as well. // Need to find a better cache busting option for this. // $response->headers->set("Cache-Control", 'max-age=86400'); return $response; } }