protected function getLocale(?string $expectedLocale)
    {
        return $expectedLocale ?? (null === $this->request ? $this->defaultLocale : $this->request->getLocale());
    }
protected function getLocale(?string $expectedLocale)
    {
        return $expectedLocale ?? (null === $this->request ? $this->defaultLocale : $this->request->getLocale());
    }
protected function getLocale ( ? string $ expectedLocale ) { return $ expectedLocale ?? ( null === $ this -> request ? $ this -> defaultLocale : $ this -> request -> getLocale ( ) ) ; }
Always get a locale even if we are not in a request.
Always get a locale even if we are not in a request .