Intl.getCanonicalLocales()
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since Oktober 2017.
Die Intl.getCanonicalLocales() statische Methode gibt ein Array zurück,
das die kanonischen Locale-Namen enthält. Duplikate werden ausgelassen und Elemente werden
als strukturell gültige Sprach-Tags validiert.
Probieren Sie es aus
Syntax
Parameter
Rückgabewert
Ein Array, das die kanonischen Locale-Namen enthält.
Beispiele
Verwendung von getCanonicalLocales
Spezifikationen
| Specification |
|---|
| ECMAScript® 2026 Internationalization API Specification # sec-intl.getcanonicallocales |