I18N
1 TopicIntl.DateTimeFormat missing Welsh (cy / cy-GB) support
Hi! I'm a developer at a company who is currently working with the Welsh government and have come across an issue with Microsoft Edge. When using the Intl.DateTimeFormat JavaScript API in Microsoft Edge, there is no support for cy / cy-GB. Intl.DateTimeFormat.supportedLocalesOf("cy-GB"); // Outputs [] Intl.DateTimeFormat.supportedLocalesOf("cy"); // Outputs [] If a developer tries to do any date formatting with the locale set to cy or cy-GB, only English will be returned. Out of curiosity I tried this with and without the Windows language being set to Welsh / Cymraeg. The result was the same (no support). Mozilla Firefox and Apple Safari have full support. Interestingly Google Chrome does not (perhaps shared issue / limitation of Chromium). Unfortunately this causes a bit of a significant challenge. Any website / web app developed for the Welsh government or related bodies is legally required to be available in Welsh. Due to the popularity of Microsoft Edge, particularly with governments and institutions, developers cannot reliably use the Intl based APIs. The only known workarounds are: To use a formatting library instead of Intl Avoids using the ECMAScript APIs designed to solve problems for developers Additional client side and developer maintenance costs To include very bulky polyfills Popular polyfill, locale and timezone information exceeds 2MB of data for the client to load per website / web app. Unsure if this a bug or locale which is yet to be supported. Adding support for Welsh would be a huge step forward and greatly appreciated by developers working with government bodies. Even better would be adding support for the same languages Windows supports!61Views0likes0Comments