public function setLocale(string $locale)
    {
        if (!in_array($locale, $this->getAvailableLanguages())) {
            throw new LanguageNotFoundException("Language $locale not found.");
        }

        $this->translator->setLocale($locale);
    }