@@ -226,35 +226,38 @@ npm install react-native-localize @formatjs/intl-pluralrules @formatjs/intl-getc
226226In your app starting entrypoint e.g. ` ./index.js ` or even better use a ` index.android.js ` to prevent importing on iOS/web put the following code. (don't forget to import the languages you want to support, in the example only english language is supported)
227227
228228``` javascript
229- // on top of your index.js file
229+ // on top of your index.android. js file
230230const isAndroid = require (' react-native' ).Platform .OS === ' android' ;
231231const isHermesEnabled = !! global .HermesInternal ;
232232
233233// in your index.js file
234234if (isHermesEnabled || isAndroid) {
235+
235236 require (' @formatjs/intl-getcanonicallocales/polyfill' );
237+ require (' @formatjs/intl-locale/polyfill' );
238+
236239
237240 require (' @formatjs/intl-pluralrules/polyfill' );
238241 require (' @formatjs/intl-pluralrules/locale-data/en.js' ); // USE YOUR OWN LANGUAGE OR MULTIPLE IMPORTS YOU WANT TO SUPPORT
239242
240- require (' @formatjs/intl-relativetimeformat/polyfill' );
241- require (' @formatjs/intl-relativetimeformat/locale-data/en.js' ); // USE YOUR OWN LANGUAGE OR MULTIPLE IMPORTS YOU WANT TO SUPPORT
242-
243- require (' @formatjs/intl-listformat/polyfill' );
244- require (' @formatjs/intl-listformat/locale-data/en.js' ); // USE YOUR OWN LANGUAGE OR MULTIPLE IMPORTS YOU WANT TO SUPPORT
245-
246243 require (' @formatjs/intl-displaynames/polyfill' );
247244 require (' @formatjs/intl-displaynames/locale-data/en.js' ); // USE YOUR OWN LANGUAGE OR MULTIPLE IMPORTS YOU WANT TO SUPPORT
248-
245+
246+ require (' @formatjs/intl-listformat/polyfill' );
247+ require (' @formatjs/intl-listformat/locale-data/en.js' ); // USE YOUR OWN LANGUAGE OR MULTIPLE IMPORTS YOU WANT TO SUPPORT
248+
249249 require (' @formatjs/intl-numberformat/polyfill' );
250250 require (' @formatjs/intl-numberformat/locale-data/en.js' ); // USE YOUR OWN LANGUAGE OR MULTIPLE IMPORTS YOU WANT TO SUPPORT
251+
252+ require (' @formatjs/intl-relativetimeformat/polyfill' );
253+ require (' @formatjs/intl-relativetimeformat/locale-data/en.js' ); // USE YOUR OWN LANGUAGE OR MULTIPLE IMPORTS YOU WANT TO SUPPORT
251254
252255 require (' @formatjs/intl-datetimeformat/polyfill' );
253256 require (' @formatjs/intl-datetimeformat/locale-data/en.js' ); // USE YOUR OWN LANGUAGE OR MULTIPLE IMPORTS YOU WANT TO SUPPORT
254257
255258 require (' @formatjs/intl-datetimeformat/add-golden-tz.js' );
256259
257- require ( ' @formatjs/intl-locale/polyfill ' );
260+
258261
259262 // https://formatjs.io/docs/polyfills/intl-datetimeformat/#default-timezone
260263 let RNLocalize = require (' react-native-localize' );
0 commit comments