getLocale(); } /** * Get the language portion of the locale. * (ex. en_GB returns en) * * @return string */ function localeLanguage(): string { $locale = locale(); return substr($locale, 0, strpos($locale, "_")); }