Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
372 views

Recently I migrated a application from webpack to rspack. Previously we were using babel-loader to transpile. Now we decided to use rspack's builtin swc-loader. We are using formatjs for intl support. ...
Sai Darshan's user avatar
0 votes
0 answers
640 views

How to add multiple line breaks to a long sentence using intl.formatmessage? I tried the following solution but it didn't work for me. Any idea/solutions? intl.formatMessage( { description: 'A ...
movoid's user avatar
  • 1
0 votes
1 answer
1k views

I'm using NextJS 13 with the app router. In a server action I'm trying to obtain localized text. For this I've created the following function: import { createIntl, createIntlCache, IntlShape } from &...
Sandy's user avatar
  • 2,702
1 vote
0 answers
841 views

In a CRA project, I am trying to use react-intl and extract all the messages used in all the <FormattedMessage /> components following the documentation, with babel-plugin-formatjs and @formatjs/...
noriktal's user avatar
2 votes
1 answer
1k views

I'm following the guide here to setup automatic id generation for FormattedMessage components under the IntlProvider but it doesn't appear to be injecting the ids at run time since I'm receiving this ...
xzist's user avatar
  • 45
1 vote
0 answers
148 views

I would like to specify the date format based on what the user has selected. When defining the Intl object I can specify the values I would like to include for a date but I can't specify the ordering ...
Michael's user avatar
  • 4,543
1 vote
0 answers
1k views

My project that I am working on is using @formatjs/intl library. And one of the used locales is non existing 'la' locale. I need to figure out a workaround for this locale, the best way would be to ...
Chopin Nocturnes's user avatar
4 votes
1 answer
5k views

Formatjs provides a babel plugin for modules that use react-intl to inject message IDs and remove description. How can I use it with Vite?
Dheeraj Vepakomma's user avatar
1 vote
0 answers
217 views

I am trying to add intl-messageformat to my project, but i am getting undefined when i tried to load the module. In path_mapping.json { ... "libs": { ... "intl-...
Joby Wilson Mathews's user avatar
0 votes
0 answers
72 views

I am new to React & Format.js. I need to do a small task which I am not able to do so. Please help me to convert date to date and time in my react js app format.js they used as a component it is ...
Noobcoder's user avatar
0 votes
1 answer
157 views

I am attempting to aggregate multiple data sources and locales into a single TMX translation memory file. I cannot seem to find any good documentation/existing tools on how converting into TMX format ...
paul's user avatar
  • 1
4 votes
3 answers
1k views

I'm using react-intl and need all uses of FormattedMessage to contain a description prop so that the translators get some context about that string. I also need to enforce it with an eslint rule so ...
amoedoamorim's user avatar
2 votes
1 answer
2k views

The Intl.Displaynames() constructor enables the translation of language, region and script display names in Javascript. Unfortunately, this is not supported in Safari versions < 14.1. (see https://...
Patrick's user avatar
  • 2,315
0 votes
1 answer
1k views

I originally misunderstood the usage of , as it seems it's only used for single-language applications. Is there a way to pluralize message that use translations as well? For example, we have a simple ...
kastaplastislife's user avatar
6 votes
1 answer
7k views

Is it possible to have an if/else in a FormatJS message? Example I have a boolean variable isDay that should determine what message is shown. When true I want to show the wording "Day" and ...
Carlton's user avatar
  • 699
-1 votes
1 answer
1k views

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 // ...
Vinay Sharma's user avatar
  • 3,887
4 votes
2 answers
1k views

When using Create React App and TypeScript, a file is auto-generated in the src directory: react-app-env.d.ts. This file seems necessary to support image imports as discussed here: https://github.com/...
PJRobot's user avatar
  • 1,444
0 votes
1 answer
305 views

When the messages are extracted they are ordered in the extraction file alphabetically according to their randomly generated ids. Is there any way to prevent that and have them ordered in the exact ...
Faire's user avatar
  • 1,061
4 votes
2 answers
5k views

In my React app, I have to show info saying create 1 hour ago or 1 day ago and also plural as 10 minutes ago or 3 days ago. To achieve that I'm trying to use this API FormatJS and in the specific intl....
Jakub's user avatar
  • 2,807
2 votes
1 answer
1k views

So I'm trying to add languages support to a React application using react-intl. The application has the Text in the JSX code. Is there a tool that can scan the code and generate ids for each Text and ...
usertest's user avatar
  • 2,320
5 votes
1 answer
4k views

What would you recommend for implementing i18n in a module federation micro-frontend next.js app? At the moment (just starting) I got it working with react-intl by declaring the provider in the _app....
gl0gl0's user avatar
  • 275
0 votes
1 answer
2k views

I'm trying to get formatjs setup for use with my app which uses react-intl, and i'm running into an issue when doing an extract using their CLI. I currently have custom components that embed the ...
smb's user avatar
  • 621
4 votes
2 answers
4k views

So, I'm implementing a project in Electron and wanted to implement internationalization into it. I have a simple component that uses react-intl's FormattedMessage and a messages.js file with a ...
user avatar
0 votes
1 answer
1k views

In the React project I'm using "react-intl": "^5.6.8" and all of sudden it started breaking when running a dev server or building, throwing an error related to the formatjs: /...
syntax-punk's user avatar
  • 4,738
1 vote
1 answer
389 views

I'm using FormatJS to localize my app. There's a handy CLI to extract all the translations from the code base. I can generate the en.json file, and send it to the translator. When I get the ...
mrtnmgs's user avatar
  • 1,612
1 vote
1 answer
3k views

When running formatjs extract this is what we got. From the stack trace it seems that the issue is from formatjs themselves. Feel like I am stuck on what the issue is here. $ formatjs extract './src/**...
developarvin's user avatar
  • 5,089
2 votes
1 answer
2k views

I'm currently working with React-intl v. ^4.7.6. I have a folder called translations where all my locale translations are in. I use IntlProvider to select which file to load based on the user's ...
bobob's user avatar
  • 103
0 votes
1 answer
1k views

How to run formatjs compile command without replacement of already translated messages? Now I run it this way: ../../node_modules/.bin/formatjs compile lang/ru.json --out-file compiled-lang/ru.json
Vera's user avatar
  • 51
2 votes
1 answer
3k views

I've built a site that translates nicely between en and zh locales, using a select element. Now, I'd like to have my code choose the initial locale based on the value of navigator.language. This led ...
carpiediem's user avatar
  • 2,048
1 vote
2 answers
5k views

I use react-intl for internationalization and in a component i get and set the locale-data like that : import fr from 'react-intl/locale-data/fr'; import en from 'react-intl/locale-data/en'; ... ...
E.D's user avatar
  • 891
4 votes
0 answers
298 views

I want to translate error messages on the backend written with the node using https://formatjs.io/ (REST API). Is it possible? I will do the translations based not "accept-language" header.
Kuba Drynkowski's user avatar
2 votes
1 answer
2k views

We have recently updated our website's npm packages (react-intl version 4.5.1) and we are using react-intl. The problem is, that we used the FormattedHTMLMessage component which doesn't seem to be ...
stef000's user avatar
  • 123
2 votes
0 answers
7k views

Current behavior import { FormattedMessage } from 'react-intl throws eslint error module "<path>/node_modules/react-intl/lib/react-intl" Casing of react-intl does not match the underlying ...
Henry's user avatar
  • 381
2 votes
1 answer
780 views

Really dumb question - what's the correct glob format? I'm trying to run formatjs extract ./src/**/*.js But it's only going one level deep.
Adam Jenkins's user avatar
  • 56.4k
5 votes
3 answers
4k views

I'm migrating react-intl to version 3.0, and need to polyfill locale-data for IE. Specifically I want to load a polyfill of locale data for en-US. I can only find @formatjs/intl-relativetimeformat/...
Ant1's user avatar
  • 354
3 votes
2 answers
9k views

Using react-intl I have the following message: serviceFee: { en: 'Service fee: ({fee, number, percent})', ... }, When I call <FormatMessage id="serviceFee" values={{ fee: 0.0625 }} /> I ...
Ramon Balthazar's user avatar
0 votes
2 answers
3k views

Looking for something compatible with ReactJS to make my Web Application multilingual along with RTL to LTR and vice-versa. As per my research, I found NPM package called "react-intl" backed by Yahoo ...
Krupal Patel's user avatar
0 votes
2 answers
2k views

I have a component (popup) that renders outside of the tree (aka portal), therefore losing the context of IntlProvider: <IntlProvider locale="en"> <App /> </IntlProvider> // * &...
Pavlo's user avatar
  • 45.3k
0 votes
1 answer
824 views

I try to use FormattedMesage(React intl) to using formatting API. how to create one formatted message, with the plural? Now: const outputTimeOutValues = [ {value:'00:00:01', translationId:'...
Palaniichuk Dmytro's user avatar
3 votes
0 answers
206 views

I'm struggling to work out the best way to structure messages whereby one of the dynamic values also needs a translation. For example if I have the message 'Type in Spanish...' I would like to use ...
djskinner's user avatar
  • 8,145
2 votes
1 answer
3k views

I have a component, that uses the injectIntl-HOC, and returns a message ... return ( <Message> {intl.formatMessage({ id: 'page.checkout.hint' }, { link: <b>{intl....
dnepro's user avatar
  • 97
4 votes
1 answer
621 views

A combination of formatjs & javascript's native Intl.NumberFormat() supports formatting of numbers as currency in various cultures and units. But how can I format a range of currency as $1,000.00 ...
Jason Kleban's user avatar
  • 21.1k
4 votes
0 answers
1k views

I'm migrating relatively large java application to React and need to implement internationalisation in React application. Sure, there are many libraries available for i18n in React, like FormaJS and ...
Mikhail Chibel's user avatar
13 votes
2 answers
24k views

I have react-router app and would like to add i18n. In react-intl example root component wrapped in IntlProvider: ReactDOM.render( <IntlProvider locale="en"> <App /> </IntlProvider&...
qwe asd's user avatar
  • 1,658
1 vote
1 answer
7k views

I'm using FormatJS library along with Handlebars to display a list of events that occured in the past. I'm calling for an endpoint on my server's REST API which returns me the list of events in Json, ...
Jeremy Belolo's user avatar
0 votes
1 answer
944 views

I have some client code which is using react-intl to display currency, language, and date time values in a the user's defined language and region (culture/locale). In addition to these requirements I ...
jpierson's user avatar
  • 17.6k
0 votes
1 answer
3k views

I would like to extract the messages from the source code to a JSON file, using Babel v6, react-intl v2, and webpack. It's all compiling fine, but not extracting anything. How do I make v2 of react-...
Henrik's user avatar
  • 9,995
4 votes
1 answer
4k views

I've been building an demo with React and came across react-intl. I tried to use the FormattedDate component with a 'value' that is returned from an API call and is stored in 'this.state' However ...
Thacker's user avatar
  • 41
3 votes
0 answers
247 views

We are using FormatJS and React Intl for a web application of ours, to translate the UI. What we are currently missing is an editor for the messages files. Does anybody know of a any decent editor ...
nutrina's user avatar
  • 1,042
13 votes
1 answer
11k views

I want to use ICU standard for my i18n in my react app. I want to store my language files like http://userguide.icu-project.org/locale/localizing#TOC-.txt-resource-bundles : de { key1 { "Deutsche ...
DeBoer's user avatar
  • 551