You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: translated/es-ES/website/docs/react-intl.md
+19-45Lines changed: 19 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,46 +9,25 @@ title: Overview
9
9
10
10
## Runtime Requirements
11
11
12
-
**We support IE11 & 2 most recent versions of Edge, Chrome & Firefox.**
12
+
**We support IE11 & 2 most recent versions of Edge, Chrome, Firefox & Safari.**
13
13
14
14
React Intl relies on these `Intl` APIs:
15
15
16
16
-[Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat): Available on IE11+
17
17
-[Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat): Available on IE11+
18
18
-[Intl.PluralRules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules): This can be polyfilled using [this package](polyfills/intl-pluralrules.md).
19
19
-[Intl.RelativeTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat): This can be polyfilled using [this package](polyfills/intl-relativetimeformat.md).
20
-
- (Optional) [Intl.DisplayNames][displaynames-spec]: Required if you use [`formatDisplayName`](react-intl/api.md#formatdisplayname) or [`FormattedDisplayName`](react-intl/components.md#formatteddisplayname). This can be polyfilled using [this package][displaynames-polyfill].
20
+
- (Optional) [Intl.DisplayNames](https://tc39.es/proposal-intl-displaynames/): Required if you use [`formatDisplayName`](react-intl/api.md#formatdisplayname) or [`FormattedDisplayName`](react-intl/components.md#formatteddisplayname). This can be polyfilled using [this package](polyfills/intl-displaynames.md).
21
21
22
22
If you need to support older browsers, we recommend you do the following:
23
23
24
24
1. Polyfill `Intl.NumberFormat` with [`@formatjs/intl-numberformat`](polyfills/intl-numberformat.md).
25
25
2. Polyfill `Intl.DateTimeFormat` with [`@formatjs/intl-datetimeformat`](polyfills/intl-datetimeformat.md)
26
26
3. If you're supporting browsers that do not have [`Intl.PluralRules`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules) (e.g IE11 & Safari 12-), include this [polyfill](polyfills/intl-pluralrules.md) in your build.
27
27
28
-
```tsx
29
-
if (!Intl.PluralRules) {
30
-
require('@formatjs/intl-pluralrules/polyfill');
31
-
require('@formatjs/intl-pluralrules/locale-data/de'); // Add locale data for de
32
-
}
33
-
```
34
-
35
28
4. If you're supporting browsers that do not have [Intl.RelativeTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) (e.g IE11, Edge, Safari 12-), include this [polyfill](polyfills/intl-relativetimeformat.md) in your build along with individual CLDR data for each locale you support.
require('@formatjs/intl-relativetimeformat/locale-data/de'); // Add locale data for de
41
-
}
42
-
```
43
-
44
-
5. If you need `Intl.DisplayNames`, include this [polyfill][displaynames-polyfill] in your build along with individual CLDR data for each locale you support.
45
-
46
-
```tsx
47
-
if (!Intl.DisplayNames) {
48
-
require('@formatjs/intl-displaynames/polyfill');
49
-
require('@formatjs/intl-displaynames/locale-data/de'); // Add locale data for de
50
-
}
51
-
```
30
+
5. If you need `Intl.DisplayNames`, include this [polyfill](polyfills/intl-displaynames.md) in your build along with individual CLDR data for each locale you support.
52
31
53
32
### Browser
54
33
@@ -86,7 +65,7 @@ If you cannot use the Intl variant of JSC (e.g on iOS), follow the instructions
86
65
FormatJS also provides types & polyfill for the following Intl API proposals:
@@ -289,41 +270,34 @@ Our [Advanced Usage](guides/advanced-usage.md) has further guides for production
289
270
We've built [@formatjs/cli](tooling/cli.md) that helps you extract messages from a list of files. It uses [babel-plugin-react-intl](tooling/babel-plugin.md) under the hood and should be able to extract messages if you're declaring using 1 of the mechanisms below:
// The whole `intl.formatMessage` is required so we can extract
314
294
id: 'foo',
315
295
defaultMessage: 'foo',
316
296
description: 'bar',
317
-
});
297
+
})
318
298
}
319
299
```
320
300
321
301
## ESLint Plugin
322
302
323
303
We've also built [eslint-plugin-formatjs](tooling/linter.md) that helps enforcing specific rules on your messages if your translation vendor has restrictions.
Copy file name to clipboardExpand all lines: translated/fr-FR/website/docs/react-intl.md
+19-45Lines changed: 19 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,46 +9,25 @@ title: Overview
9
9
10
10
## Runtime Requirements
11
11
12
-
**We support IE11 & 2 most recent versions of Edge, Chrome & Firefox.**
12
+
**We support IE11 & 2 most recent versions of Edge, Chrome, Firefox & Safari.**
13
13
14
14
React Intl relies on these `Intl` APIs:
15
15
16
16
-[Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat): Available on IE11+
17
17
-[Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat): Available on IE11+
18
18
-[Intl.PluralRules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules): This can be polyfilled using [this package](polyfills/intl-pluralrules.md).
19
19
-[Intl.RelativeTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat): This can be polyfilled using [this package](polyfills/intl-relativetimeformat.md).
20
-
- (Optional) [Intl.DisplayNames][displaynames-spec]: Required if you use [`formatDisplayName`](react-intl/api.md#formatdisplayname) or [`FormattedDisplayName`](react-intl/components.md#formatteddisplayname). This can be polyfilled using [this package][displaynames-polyfill].
20
+
- (Optional) [Intl.DisplayNames](https://tc39.es/proposal-intl-displaynames/): Required if you use [`formatDisplayName`](react-intl/api.md#formatdisplayname) or [`FormattedDisplayName`](react-intl/components.md#formatteddisplayname). This can be polyfilled using [this package](polyfills/intl-displaynames.md).
21
21
22
22
If you need to support older browsers, we recommend you do the following:
23
23
24
24
1. Polyfill `Intl.NumberFormat` with [`@formatjs/intl-numberformat`](polyfills/intl-numberformat.md).
25
25
2. Polyfill `Intl.DateTimeFormat` with [`@formatjs/intl-datetimeformat`](polyfills/intl-datetimeformat.md)
26
26
3. If you're supporting browsers that do not have [`Intl.PluralRules`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules) (e.g IE11 & Safari 12-), include this [polyfill](polyfills/intl-pluralrules.md) in your build.
27
27
28
-
```tsx
29
-
if (!Intl.PluralRules) {
30
-
require('@formatjs/intl-pluralrules/polyfill');
31
-
require('@formatjs/intl-pluralrules/locale-data/de'); // Add locale data for de
32
-
}
33
-
```
34
-
35
28
4. If you're supporting browsers that do not have [Intl.RelativeTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) (e.g IE11, Edge, Safari 12-), include this [polyfill](polyfills/intl-relativetimeformat.md) in your build along with individual CLDR data for each locale you support.
require('@formatjs/intl-relativetimeformat/locale-data/de'); // Add locale data for de
41
-
}
42
-
```
43
-
44
-
5. If you need `Intl.DisplayNames`, include this [polyfill][displaynames-polyfill] in your build along with individual CLDR data for each locale you support.
45
-
46
-
```tsx
47
-
if (!Intl.DisplayNames) {
48
-
require('@formatjs/intl-displaynames/polyfill');
49
-
require('@formatjs/intl-displaynames/locale-data/de'); // Add locale data for de
50
-
}
51
-
```
30
+
5. If you need `Intl.DisplayNames`, include this [polyfill](polyfills/intl-displaynames.md) in your build along with individual CLDR data for each locale you support.
52
31
53
32
### Browser
54
33
@@ -86,7 +65,7 @@ If you cannot use the Intl variant of JSC (e.g on iOS), follow the instructions
86
65
FormatJS also provides types & polyfill for the following Intl API proposals:
@@ -289,41 +270,34 @@ Our [Advanced Usage](guides/advanced-usage.md) has further guides for production
289
270
We've built [@formatjs/cli](tooling/cli.md) that helps you extract messages from a list of files. It uses [babel-plugin-react-intl](tooling/babel-plugin.md) under the hood and should be able to extract messages if you're declaring using 1 of the mechanisms below:
// The whole `intl.formatMessage` is required so we can extract
314
294
id: 'foo',
315
295
defaultMessage: 'foo',
316
296
description: 'bar',
317
-
});
297
+
})
318
298
}
319
299
```
320
300
321
301
## ESLint Plugin
322
302
323
303
We've also built [eslint-plugin-formatjs](tooling/linter.md) that helps enforcing specific rules on your messages if your translation vendor has restrictions.
0 commit comments