i18n.getPreferredSystemLanguages()

Returns the preferred locales of the operating system. This is different from the locales set in the browser; to get those, use i18n.getAcceptLanguages.

Syntax

js
let preferredSystemLanguages = await browser.i18n.getPreferredSystemLanguages()

Parameters

None.

Return value

A Promise fulfilled with an array of i18n.LanguageCode strings.

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
getPreferredSystemLanguages
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Full support
Firefox 141 (Release date: 2025-07-22)
footnote Full support
Opera – No support
Opera
footnote No support
Safari – Full support
Safari 18.4 (Release date: 2025-03-31)
footnote Full support
Firefox for Android – Full support
Firefox for Android 141 (Release date: 2025-07-22)
footnote Full support
Safari on iOS – Full support
Safari on iOS 18.4 (Release date: 2025-03-31)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support