Web/API/Window/languagechange event

From Get docs


The languagechange event is fired at the global scope object when the user's preferred language changes.

Bubbles No
Cancelable No
Interface Event
Event handler onlanguagechange

Examples

You can use the languagechange event in an addEventListener method:

window.addEventListener('languagechange', function() {
  console.log('languagechange event detected!'); 
});

Or use the onlanguagechange event handler property:

window.onlanguagechange = function(event) {
  console.log('languagechange event detected!');
};

Specification

Specification Status
HTML Living StandardThe definition of 'languagechange' in that specification. Living Standard

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
languagechange event Chrome

Full support 37

Edge

Full support ≤79

Firefox

Full support 32

IE

No support No

Opera

Full support 24

Safari

?

WebView Android

Full support 37

Chrome Android

Full support 37

Firefox Android

Full support 4

Opera Android

Full support 24

Safari iOS

?

Samsung Internet Android

Full support 4.0

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown


See also