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:
worker.addEventListener('languagechange', function() {
console.log('languagechange event detected!');
});
Or use the onlanguagechange
event handler property:
worker.onlanguagechange = function(event) {
console.log('languagechange event detected!');
};
Specification
Specification | Status |
---|---|
HTML Living StandardThe definition of 'languagechange' in that specification. | Living Standard |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
languagechange event
|
Chrome
Full support 4 |
Edge
Full support 12 |
Firefox
Full support 74 |
IE
Full support Yes |
Opera
Full support 11.5 |
Safari
Full support 4 |
WebView Android
? |
Chrome Android
Full support 40 |
Firefox Android
No support No |
Opera Android
Full support Yes |
Safari iOS
Full support 5.1 |
Samsung Internet Android
Full support 4.0 |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
See also
WorkerGlobalScope: languagechange event by Mozilla Contributors is licensed under CC-BY-SA 2.5.