Window: languagechange event

Vous lisez la version anglaise de ce contenu car il n’existe pas encore de traduction dans cette langue. Aidez-nous à traduire cet article !

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 Standard
The definition of 'languagechange' in that specification.
Living Standard

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
languagechange eventChrome Full support 37Edge ? Firefox Full support 32IE No support NoOpera Full support 24Safari ? WebView Android Full support 37Chrome Android Full support 37Firefox Android Full support 4Opera Android Full support 24Safari iOS ? Samsung Internet Android ?

Legend

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

See also