all
alt
ch
dir
id
min
rel
top
url
URL
urn
Expand Minimize

browserLanguage property

Retrieves the current operating system language. For Windows Store apps, see Remarks.

Note  This property does not indicate the language or languages set by the user in Language Preferences, located in the Internet Options dialog box.

Syntax

JavaScript

p = object.browserLanguage

 

Property values

Type: String

one of the values in the Language Codes.

Remarks

Detecting language in Windows Store apps

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.


Windows.ApplicationModel.Resources.Core.ResourceManager.current.defaultContext.languages


For more info, see How to manage language and region (Windows Store apps using JavaScript and HTML) .

See also

clientInformation
navigator
Reference
systemLanguage
userLanguage

 

 

Show:
© 2015 Microsoft