I’m trying to make my default language in Next.js i18n but always is getting “En” as default language called like fallback. And I also get this error: Error: [@formatjs/intl Error MISSING_DATA] Missing locale data for locale: “sq” in Intl.NumberFormat. Using default locale: “en” as fallback Answer Next.js will automatically detect which locale the user prefers based on the Accept-Language header
Tag: react-intl
How do I extract messages from multiple specific folders with FormatJS CLI?
I have /components/foo.js and /pages/bar.js, both are using <FormattedMessage /> with a different defaultMessage: If I run formatjs extract ‘components/**/*.js’ –out-file lang/en.json I only get messages from my components folder. If instead I use the path pages/**/*.js, I only get messages from my pages folder. Tried a few differente combinations without luck: (components,pages)/**/*.js (components&pages)/**/*.js (components|pages)/**/*.js !(node_modules)/**/*.js to compile everything except