In my ReactJS project I'm trying to provide a user interface in Swiss German (gsw-CH), including proper formatting of numbers, currencies, dates, and times. It seems like Swiss German is not supported out of the box, because I get this error in console:
Error: [@formatjs/intl Error MISSING_DATA] Missing locale data for locale: "gsw-CH" in Intl.NumberFormat. Using default locale: "en" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details
Is there a way (maybe some polyfill) to support Swiss German formatting? I also don't understand why date formatting uses German month and weekday names instead of English (the default locale). For instance it uses "Dezember" (de) instead of "December" (en) or "Dezämber" (gsw-CH). Looking into @formatjs/intl-datetimeformat/locale-data I see files for gsw, gsw-LI, and gsw-FR. So I tried using "gsw-LI" instead of "gsw-CH", but I get the same error and the same result.
The IntlProvider class seems to support this scenario, as it has options to define formats for numbers, dates, etc. But so far I have not found out how these options need to be set. I could not find a sample.