Questions tagged [react-intl]

React Components for internationalization. Combines react components with FormatJS.

This library provides React Components and a Mixin to format data and strings, and internationalize your React app.

Features

  • Formats numbers and dates/times, including those in complex messages.
  • Formats relative times (e.g., "3 hours ago").
  • Formats complex messages, including plural and select arguments using ICU Message syntax.
  • Supports custom formatters for numbers and dates/times.

Installation

npm install react-intl
396 questions
-1
votes
2 answers

React Intl Could not find required `intl` object. needs to exist in the component ancestry

I have used latest version of React-intl(^5.20.2). Trying to achieve Enzyme Unit testing in React hook component. but throwing this error "[React Intl] Could not find required intl object. needs to exist in the component ancestry." on UseIntl()…
-1
votes
1 answer

Gatsby: WebpackError [React Intl] Could not find required `intl` object. needs to exist in the component ancestry

I'm using React Intl for internationalisation in my Gatsby app. The app runs fine as expected with npm start, but the build fails with an error during execution of npm run build command. Code // gatsby-browser.js import React from "react" import {…
Vinay Sharma
  • 3,291
  • 4
  • 30
  • 66
-1
votes
2 answers

Using IntlProvider with react-testing-library

For abstraction purpose, the app I work on has a custom provider that wraps a couple of other providers (like IntlProvider and CookiesProvider). The version of react-intl we use in our app is still v2 (react-intl@2.8.0). A simplified version of my…
-1
votes
1 answer

How to add data to intl.formatMessage?

How can I add data to intl.formatMessage on react-intl, an example: this is showing product.select.data But, How can I do same with intl.formatMessage? this not working. this is showing…
Marcus
  • 57
  • 1
  • 5
-1
votes
1 answer

React Intl Date Format to get specific date format

I am using React Intl Date formating API's https://github.com/formatjs/react-intl/blob/master/docs/API.md#date-formatting-apis I wanted to have the date in this format August 7, 2019 Basically the Intl date does not have the following format. This…
Matarishvan
  • 2,382
  • 3
  • 38
  • 68
-1
votes
1 answer

react-intl display currency symbol only

Working with react-intl and was looking to display a currency symbol only, after some text like USD$. From what I have read so far in the documentation guessing FormattedNumber requires a default value. Just wondering is it possible to display a…
uidevthing
  • 1,781
  • 2
  • 12
  • 24
1 2 3
26
27