detectLanguage
Detects the preferred language of the current user.
- Use
NavigationLanguage.language
or the firstNavigationLanguage.languages
if available, otherwise returndefaultLang
. - Omit the second argument,
defaultLang
, to use'en-US'
as the default language code.