You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missing locale data for: "en-US". Using default locale: "en" as fallback. #204
changed the title [-][React Intl] Missing locale data for: "en-US". Using default locale: "en" as fallback.[/-][+]Missing locale data for: "en-US". Using default locale: "en" as fallback.[/+]on Nov 3, 2015
You'll need to load locale-data/en.js to get support for en-US. By default only the root, en locale data is provided.
It doesn't support a properly formatted locale.
This is incorrect. The locale data files are provide per language, e.g. en.js, but they contain data for all locales in that language, e.g. en-US, en-GB, etc.
Reacted by Saad Aouad, Leonardo Cristofani and Pavel Fiskovich
Hey @ericf, thanks for your answers. I am getting this in Gatsby w/ community i18n plugin. I have added the locale-data as you can see here, but I still get the below error. Any more specific ideas to what is missing? I have only de and en-US langs set, no en at the moment as it's not my repo.
commons.js:77217 [React Intl] Missing message: "selectLanguage" for locale: "en-US"
commons.js:77217 [React Intl] Missing message: "selectLanguage" for locale: "de"
commons.js:77217 [React Intl] Missing message: "selectLanguage" for locale: "en"
This seems to be workign now via:
import { addLocaleData } from 'react-intl';
import en from 'react-intl/locale-data/en';
import 'intl/locale-data/jsonp/en';
addLocaleData(en); // It seems this also adds "en-US" locale?
Activity
[-][React Intl] Missing locale data for: "en-US". Using default locale: "en" as fallback.[/-][+]Missing locale data for: "en-US". Using default locale: "en" as fallback.[/+]catamphetamine commentedon Nov 3, 2015
I found the cause of the error:
It doesn't support a properly formatted
locale.A workaround:
ericf commentedon Nov 3, 2015
You'll need to load
locale-data/en.jsto get support foren-US. By default only the root,enlocale data is provided.This is incorrect. The locale data files are provide per language, e.g.
en.js, but they contain data for all locales in that language, e.g.en-US,en-GB, etc.Refactor build and package layout
Refactor build and package layout
Refactor build and package layout
Refactor build and package layout
SachaG commentedon Jun 9, 2016
I just ran into this issue. So just to clarify, in the following snippet
frworks butfr_FRdoesn't:Is that the expected behavior? What would I need to do if I did want to use
fr_FRorfr_CAinstead?ericf commentedon Jun 9, 2016
@SachaG The locale needs to be a BCP-47 language tag. Replace
_with-.mccrodp commentedon Feb 19, 2018
Hey @ericf, thanks for your answers. I am getting this in Gatsby w/ community i18n plugin. I have added the
locale-dataas you can see here, but I still get the below error. Any more specific ideas to what is missing? I have onlydeanden-USlangs set, noenat the moment as it's not my repo.This seems to be workign now via:
i18n: Rename state.settings.{locale -> language}.
i18n: Rename state.settings.{locale -> language}.