Intl.Locale

Cette fonction est expérimentale
Puisque cette fonction est toujours en développement dans certains navigateurs, veuillez consulter le tableau de compatibilité pour les préfixes à utiliser selon les navigateurs.
Il convient de noter qu'une fonctionnalité expérimentale peut voir sa syntaxe ou son comportement modifié dans le futur en fonction des évolutions de la spécification.

Le constructeur Intl.Locale est une propriété native de l'objet Intl représentant l'identifiant d'une locale Unicode.

Syntaxe

new Intl.Locale([tag[, options]])

Paramètres

tag
La chaîne de caractère représentant l'identifiant d'une locale Unicode.
options
Un objet contenant la configuration pour la locale. Les clés (noms des propriétés) de cet objets sont des balises Unicode et les valeurs de ces propriétés doivent être des valeurs de balises Unicode valides.

Description

L'objet Intl.locale a été conçu afin de manipuler des locales Unicode. Les locales Unicode sont représentées par une chaîne de caractères qu'on appelle « identifiant de locale ». L'identifant de locale se compose d'un identifiant de langue et d'extensions. Les identifiants de langue sont la composante principale d'une locale et contiennent une langue, un système d'écriture et des extensions régionales. Les informations complémentaires sont stockées via les extensions. Ces extensions peuvent fournir des informations quant au type de calendrier utilisé, le format d'heure utilisé ou la numération utilisée.

L'objet Intl.Locale possède les propriétés et méthodes suivantes.

Propriétés

Intl.Locale.prototype
Le prototype pour le constructeur Locale.

Spécifications

Spécification État Commentaires
Proposition pour Intl.Locale Proposition de niveau 3

Compatibilité des navigateurs

Update compatibility data on GitHub
OrdinateurMobileServeur
ChromeEdgeFirefoxInternet ExplorerOperaSafariWebview AndroidChrome pour AndroidFirefox pour AndroidOpera pour AndroidSafari sur iOSSamsung InternetNode.js
LocaleChrome Support complet 74Edge Support complet 79Firefox Support complet 75IE Aucun support NonOpera Support complet 62Safari Support complet 14
Notes
Support complet 14
Notes
Notes Safari 14 Technology Preview 107-111 returns a string instead of a Locale object from the minimize and maximize methods.
WebView Android Support complet 74Chrome Android Support complet 74Firefox Android Aucun support NonOpera Android Support complet 53Safari iOS Support complet 14
Notes
Support complet 14
Notes
Notes Safari 14 Technology Preview 107-111 returns a string instead of a Locale object from the minimize and maximize methods.
Samsung Internet Android Support complet 11.0nodejs Support complet 12.0.0
Notes
Support complet 12.0.0
Notes
Notes Before version 13.0.0, only the locale data for en-US is available by default. See the Locale() constructor for more details.
Locale() constructorChrome Support complet 74Edge Support complet 79Firefox Support complet 75IE Aucun support NonOpera Support complet 62Safari Support complet 14WebView Android Support complet 74Chrome Android Support complet 74Firefox Android Aucun support NonOpera Android Support complet 53Safari iOS Support complet 14Samsung Internet Android Support complet 11.0nodejs Support complet 13.0.0
Support complet 13.0.0
Support partiel 12.0.0
Notes
Notes Before version 13.0.0, only the locale data for en-US is available by default. When other locales are specified, the Locale instance silently falls back to en-US. To make full ICU (locale) data available for versions prior to 13, see Node.js documentation on the --with-intl option and how to provide the data.
baseNameChrome Support complet 74Edge Support complet 79Firefox Support complet 75IE Aucun support NonOpera Support complet 62Safari Support complet 14WebView Android Support complet 74Chrome Android Support complet 74Firefox Android Aucun support NonOpera Android Support complet 53Safari iOS Support complet 14Samsung Internet Android Support complet 11.0nodejs Support complet 12.0.0
Notes
Support complet 12.0.0
Notes
Notes Before version 13.0.0, only the locale data for en-US is available by default. See the Locale() constructor for more details.
calendarChrome Support complet 74Edge Support complet 79Firefox Support complet 75IE Aucun support NonOpera Support complet 62Safari Support complet 14WebView Android Support complet 74Chrome Android Support complet 74Firefox Android Aucun support NonOpera Android Support complet 53Safari iOS Support complet 14Samsung Internet Android Support complet 11.0nodejs Support complet 12.0.0
Notes
Support complet 12.0.0
Notes
Notes Before version 13.0.0, only the locale data for en-US is available by default. See the Locale() constructor for more details.
caseFirstChrome Support complet 74Edge Support complet 79Firefox Support complet 75IE Aucun support NonOpera Support complet 62Safari Support complet 14WebView Android Support complet 74Chrome Android Support complet 74Firefox Android Aucun support NonOpera Android Support complet 53Safari iOS Support complet 14Samsung Internet Android Support complet 11.0nodejs Support complet 12.0.0
Notes
Support complet 12.0.0
Notes
Notes Before version 13.0.0, only the locale data for en-US is available by default. See the Locale() constructor for more details.
collationChrome Support complet 74Edge Support complet 79Firefox Support complet 75IE Aucun support NonOpera Support complet 62Safari Support complet 14WebView Android Support complet 74Chrome Android Support complet 74Firefox Android Aucun support NonOpera Android Support complet 53Safari iOS Support complet 14Samsung Internet Android Support complet 11.0nodejs Support complet 12.0.0
Notes
Support complet 12.0.0
Notes
Notes Before version 13.0.0, only the locale data for en-US is available by default. See the Locale() constructor for more details.
hourCycleChrome Support complet 74Edge Support complet 79Firefox Support complet 75IE Aucun support NonOpera Support complet 62Safari Support complet 14WebView Android Support complet 74Chrome Android Support complet 74Firefox Android Aucun support NonOpera Android Support complet 53Safari iOS Support complet 14Samsung Internet Android Support complet 11.0nodejs Support complet 12.0.0
Notes
Support complet 12.0.0
Notes
Notes Before version 13.0.0, only the locale data for en-US is available by default. See the Locale() constructor for more details.
languageChrome Support complet 74Edge Support complet 79Firefox Support complet 75IE Aucun support NonOpera Support complet 62Safari Support complet 14WebView Android Support complet 74Chrome Android Support complet 74Firefox Android Aucun support NonOpera Android Support complet 53Safari iOS Support complet 14Samsung Internet Android Support complet 11.0nodejs Support complet 12.0.0
Notes
Support complet 12.0.0
Notes
Notes Before version 13.0.0, only the locale data for en-US is available by default. See the Locale() constructor for more details.
maximizeChrome Support complet 74Edge Support complet 79Firefox Support complet 75IE Aucun support NonOpera Support complet 62Safari Support complet 14
Notes
Support complet 14
Notes
Notes Safari 14 Technology Preview 107-111 returns a string instead of a Locale object.
WebView Android Support complet 74Chrome Android Support complet 74Firefox Android Aucun support NonOpera Android Support complet 53Safari iOS Support complet 14
Notes
Support complet 14
Notes
Notes Safari 14 Technology Preview 107-111 returns a string instead of a Locale object.
Samsung Internet Android Support complet 11.0nodejs Support complet 12.0.0
Notes
Support complet 12.0.0
Notes
Notes Before version 13.0.0, only the locale data for en-US is available by default. See the Locale() constructor for more details.
minimizeChrome Support complet 74Edge Support complet 79Firefox Support complet 75IE Aucun support NonOpera Support complet 62Safari Support complet 14
Notes
Support complet 14
Notes
Notes Safari 14 Technology Preview 107-111 returns a string instead of a Locale object.
WebView Android Support complet 74Chrome Android Support complet 74Firefox Android Aucun support NonOpera Android Support complet 53Safari iOS Support complet 14
Notes
Support complet 14
Notes
Notes Safari 14 Technology Preview 107-111 returns a string instead of a Locale object.
Samsung Internet Android Support complet 11.0nodejs Support complet 12.0.0
Notes
Support complet 12.0.0
Notes
Notes Before version 13.0.0, only the locale data for en-US is available by default. See the Locale() constructor for more details.
numberingSystemChrome Support complet 74Edge Support complet 79Firefox Support complet 75IE Aucun support NonOpera Support complet 62Safari Support complet 14WebView Android Support complet 74Chrome Android Support complet 74Firefox Android Aucun support NonOpera Android Support complet 53Safari iOS Support complet 14Samsung Internet Android Support complet 11.0nodejs Support complet 12.0.0
Notes
Support complet 12.0.0
Notes
Notes Before version 13.0.0, only the locale data for en-US is available by default. See the Locale() constructor for more details.
numericChrome Support complet 74Edge Support complet 79Firefox Support complet 75IE Aucun support NonOpera Support complet 62Safari Support complet 14WebView Android Support complet 74Chrome Android Support complet 74Firefox Android Aucun support NonOpera Android Support complet 53Safari iOS Support complet 14Samsung Internet Android Support complet 11.0nodejs Support complet 12.0.0
Notes
Support complet 12.0.0
Notes
Notes Before version 13.0.0, only the locale data for en-US is available by default. See the Locale() constructor for more details.
regionChrome Support complet 74Edge Support complet 79Firefox Support complet 75IE Aucun support NonOpera Support complet 62Safari Support complet 14WebView Android Support complet 74Chrome Android Support complet 74Firefox Android Aucun support NonOpera Android Support complet 53Safari iOS Support complet 14Samsung Internet Android Support complet 11.0nodejs Support complet 12.0.0
Notes
Support complet 12.0.0
Notes
Notes Before version 13.0.0, only the locale data for en-US is available by default. See the Locale() constructor for more details.
scriptChrome Support complet 74Edge Support complet 79Firefox Support complet 75IE Aucun support NonOpera Support complet 62Safari Support complet 14WebView Android Support complet 74Chrome Android Support complet 74Firefox Android Aucun support NonOpera Android Support complet 53Safari iOS Support complet 14Samsung Internet Android Support complet 11.0nodejs Support complet 12.0.0
Notes
Support complet 12.0.0
Notes
Notes Before version 13.0.0, only the locale data for en-US is available by default. See the Locale() constructor for more details.
toStringChrome Support complet 74Edge Support complet 79Firefox Support complet 75IE Aucun support NonOpera Support complet 62Safari Support complet 14WebView Android Support complet 74Chrome Android Support complet 74Firefox Android Aucun support NonOpera Android Support complet 53Safari iOS Support complet 14Samsung Internet Android Support complet 11.0nodejs Support complet 12.0.0
Notes
Support complet 12.0.0
Notes
Notes Before version 13.0.0, only the locale data for en-US is available by default. See the Locale() constructor for more details.

Légende

Support complet  
Support complet
Aucun support  
Aucun support
Voir les notes d'implémentation.
Voir les notes d'implémentation.

Voir aussi