From c77095d2750d6927207754ccbf46a215f8eacaed Mon Sep 17 00:00:00 2001 From: Glenn Slotte Date: Fri, 2 Apr 2021 14:08:06 +0200 Subject: [PATCH] docs(polyfills): clarify that dependent locales must be specified individually (#2789) --- website/docs/polyfills/intl-datetimeformat.md | 6 +++--- website/docs/polyfills/intl-numberformat.md | 11 +++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/website/docs/polyfills/intl-datetimeformat.md b/website/docs/polyfills/intl-datetimeformat.md index ba5bb564ab..f33d289149 100644 --- a/website/docs/polyfills/intl-datetimeformat.md +++ b/website/docs/polyfills/intl-datetimeformat.md @@ -55,17 +55,17 @@ This package requires the following capabilities: - [`Intl.getCanonicalLocales`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales) or [polyfill](intl-getcanonicallocales.md) - [`Intl.Locale`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) or [polyfill](intl-locale.md). -- [`Intl.NumberFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat) +- [`Intl.NumberFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat) or [polyfill](intl-numberformat.md). ## Usage ### Via polyfill.io -You can use [polyfill.io URL Builder](https://polyfill.io/v3/url-builder/) to create a polyfill script tag for `Intl.DateTimeFormat`. By default the created URL does not come with any locale data. In order to add locale data, append `Intl.DateTimeFormat.~locale.` to your list of features. For example: +You can use [polyfill.io URL Builder](https://polyfill.io/v3/url-builder/) to create a polyfill script tag for `Intl.DateTimeFormat`. By default the created URL does not come with any locale data. In order to add locale data, append `Intl.DateTimeFormat.~locale.`, as well as locale data for any required polyfills, to your list of features. For example: ```html - + ``` ### Simple diff --git a/website/docs/polyfills/intl-numberformat.md b/website/docs/polyfills/intl-numberformat.md index 3f39baf0ae..1609255a80 100644 --- a/website/docs/polyfills/intl-numberformat.md +++ b/website/docs/polyfills/intl-numberformat.md @@ -45,7 +45,7 @@ This package requires the following capabilities: - [`Intl.getCanonicalLocales`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales) or [polyfill](intl-getcanonicallocales.md) - [`Intl.Locale`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) or [polyfill](intl-locale.md). -- [`Intl.PluralRules`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules) +- [`Intl.PluralRules`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules) or [polyfill](intl-pluralrules.md). ## Features @@ -55,13 +55,20 @@ Everything in the ES2020 Internationalization API spec (https://tc39.es/ecma402) ### Via polyfill.io -You can use [polyfill.io URL Builder](https://polyfill.io/v3/url-builder/) to create a polyfill script tag for `Intl.NumberFormat`. By default the created URL does not come with any locale data. In order to add locale data, append `Intl.NumberFormat.~locale.` to your list of features. For example: +You can use [polyfill.io URL Builder](https://polyfill.io/v3/url-builder/) to create a polyfill script tag for `Intl.NumberFormat`. By default the created URL does not come with any locale data. In order to add locale data, append `Intl.NumberFormat.~locale.`, as well as locale data for any required polyfills, to your list of features. For example: ```html ``` +Or if `Intl.PluralRules` needs to be polyfilled as well: + +```html + + +``` + ### Simple ```tsx