From 39f2114f9797eb51994966c6bb8ff1814c9a4da8 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:36:08 +0100 Subject: unslug fr: move --- .../object/tolocalestring/index.html | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 files/fr/web/javascript/reference/global_objects/object/tolocalestring/index.html (limited to 'files/fr/web/javascript/reference/global_objects/object/tolocalestring/index.html') diff --git a/files/fr/web/javascript/reference/global_objects/object/tolocalestring/index.html b/files/fr/web/javascript/reference/global_objects/object/tolocalestring/index.html new file mode 100644 index 0000000000..1a8069abcf --- /dev/null +++ b/files/fr/web/javascript/reference/global_objects/object/tolocalestring/index.html @@ -0,0 +1,85 @@ +--- +title: Object.prototype.toLocaleString() +slug: Web/JavaScript/Reference/Objets_globaux/Object/toLocaleString +tags: + - JavaScript + - Méthode + - Prototype + - Reference +translation_of: Web/JavaScript/Reference/Global_Objects/Object/toLocaleString +--- +
{{JSRef}}
+ +

La méthode toLocaleString() renvoie une chaine de caractères représentant l'objet. Cette méthode est destinée à être surchargée par les objets dérivés à des fins spécifiques pour prendre en compte les locales.

+ +
{{EmbedInteractiveExample("pages/js/object-prototype-tolocalestring.html")}}
+ + + +

Syntaxe

+ +
obj.toLocaleString()
+ +

Valeur de retour

+ +

Une chaîne de caractères qui représente l'objet en tenant compte de la locale.

+ +

Description

+ +

La méthode toLocaleString renvoie le résultat de l'appel à la méthode {{jsxref("Object.toString", "toString()")}}.

+ +

Cette fonction est destinée à fournir aux objets une méthode générique toLocaleString, même si tous ne peuvent l'utiliser. Voir la liste ci-dessous.

+ +

Objets surchargeant la méthode toLocaleString

+ + + +

Spécifications

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpécificationÉtatCommentaires
{{SpecName('ES3')}}{{Spec2('ES3')}}Définition initiale.
{{SpecName('ES5.1', '#sec-15.2.4.3', 'Object.prototype.toLocaleString')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-object.prototype.tolocalestring', 'Object.prototype.toLocaleString')}}{{Spec2('ES6')}} 
{{SpecName('ESDraft', '#sec-object.prototype.tolocalestring', 'Object.prototype.toLocaleString')}}{{Spec2('ESDraft')}} 
+ +

Compatibilité des navigateurs

+ + + +

{{Compat("javascript.builtins.Object.toLocaleString")}}

+ +

Voir aussi

+ + -- cgit v1.2.3-54-g00ecf