Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Error: Cannot find react-intl/locale-data/hk in Safari #165

Open
donaldkg opened this issue Dec 23, 2020 · 1 comment
Open

Getting Error: Cannot find react-intl/locale-data/hk in Safari #165

donaldkg opened this issue Dec 23, 2020 · 1 comment

Comments

@donaldkg
Copy link

I am using the following config in my gatsby project. When I run develop mode in Safari it shows the error like the screen capture below. But, when I use Chrome, the page is fine. Can anyone please help?

{
  resolve: `gatsby-plugin-intl`,
  options: {
    // language JSON resource path
    path: `${__dirname}/src/intl`,
    // supported language
    languages: ['hk'],
    // language file path
    defaultLanguage: `hk`,
    // option to redirect to `/hk` when connecting `/`
    redirect: true,
  },
},

image

@maurobarrionuevo
Copy link

I had the same problem once. I was trying to use "ar" for Argentina and "cl" for Chile. After some research and looking into the library I realized that locales supported are those listed on CLDR. So instead I had to use "es-AR" and "es-CL". I ended up using a pollyfill that worked well on Safari. You can read more here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants