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