public function localeToLanguage(string $locale): string
    {
        if (empty($locale)) {
            throw new InvalidArgumentException("Locale must be a non-emptystring.");
        }

        // Truncate all, starting with underscore, at, or dot
        $result = (string)preg_replace('/(_|@|\.).*$/', '', strtolower($locale));
        // Convert to lowercase for consistency
        $result = strtolower($result);

        return $result;
    }