public function getLocale()
    {
        $locale = $this->requestStack->getCurrentRequest() instanceof Request
            ? $this->requestStack->getCurrentRequest()->getLocale()
            : $this->defaultLocale;

        return Locale::create($locale);
    }