diff --git a/live-examples/js-examples/intl/intl-locale-prototype-tostring.html b/live-examples/js-examples/intl/intl-locale-prototype-tostring.html new file mode 100644 index 000000000..467adeb6a --- /dev/null +++ b/live-examples/js-examples/intl/intl-locale-prototype-tostring.html @@ -0,0 +1,10 @@ +
+const french = new Intl.Locale("fr-Latn-FR", {calendar: "gregory", hourCycle: "h24"});
+const korean = new Intl.Locale("ko-Kore-KR", {numeric: true, caseFirst: "upper"});
+
+console.log(french.toString());
+// expected output: "fr-Latn-FR-u-ca-gregory-hc-h24"
+
+console.log(korean.toString())
+//expected output: "ko-Kore-KR-u-kf-upper-kn"
+
diff --git a/live-examples/js-examples/intl/meta.json b/live-examples/js-examples/intl/meta.json
index b8a95772e..e5d85e0c0 100644
--- a/live-examples/js-examples/intl/meta.json
+++ b/live-examples/js-examples/intl/meta.json
@@ -72,6 +72,12 @@
"title": "JavaScript Demo: Intl.Locale.prototype.minimize()",
"type": "js"
},
+ "intlLocalePrototypeToString": {
+ "exampleCode": "./live-examples/js-examples/intl/intl-locale-prototype-tostring.html",
+ "fileName": "intl-locale-prototype-tostring.html",
+ "title": "JavaScript Demo: Intl.Locale.prototype.toString()",
+ "type": "js"
+ },
"intlNumberFormatPrototypeFormat": {
"exampleCode": "./live-examples/js-examples/intl/intl-numberformat-prototype-format.html",
"fileName": "intl-numberformat-prototype-format.html",