Ali Aljarah
Ali Aljarah

Reputation: 1396

Force FormattedNumber in react-intl to show only english number

I'm working on a react app that needs to be localized in English and Arabic, when switching from English to Arabic all the numbers are switching to Arabic also which in my case should remain in English format.

is there a way that i can override the Locales in IntlProvider and force to use only en-US locale?

Upvotes: 3

Views: 993

Answers (1)

Ali Aljarah
Ali Aljarah

Reputation: 1396

Found the solution to this problem. By wrapping the FormattedNumber component by IntlProvider and passing locale='en' as props to Intlprovider i was able to override the App locales.

Upvotes: 1

Related Questions