Retrieves the current operating system language.
HRESULT value = object.get_browserLanguage(* p);
one of the values in the Language Codes.
The IOmNavigator::browserLanguage property reflects the language of the operating system regardless of the installed language version of Windows Internet Explorer. However, if Windows 2000 MultiLanguage version is installed, the IOmNavigator::browserLanguage property indicates the language set in the operating system's current menus and dialogs, as found in the Regional Options of the Control Panel. For example, if you install a Japanese version of Microsoft Internet Explorer 5 on an English (United Kingdom) operating system, IOmNavigator::browserLanguage would be
en-gb. If you install Windows 2000 MultiLanguage version and set the language of the menus and dialogs to French, IOmNavigator::browserLanguage would be
fr, even though you have a Japanese version of Internet Explorer.
Prior to Internet Explorer 5, the IOmNavigator::browserLanguage property reflected the language of the installed browser's user interface. For example, if you installed a Japanese version of Internet Explorer on an English operating system, IOmNavigator::browserLanguage would have been
For Windows Store app Don't use this property to get the app language in a Windows Store app. Use Windows.System.UserProfile.GlobalizationPreferences.languages to get the user's language list and Windows.Globalization.ApplicationLanguages.languages to get the app's current language.
You can also use the languages property of the default resourceContext. You can get the default resource context of the app from the DefaultContext property of the ResourceManager in the Windows.ApplicationModel.Resources.Core namespace.
The following example displays the language reported by the browser.