Closed kushuh closed 1 year ago
I'm trying to use the Intl DateTimeFormat API from the chromium browser, but only the "en-US" locale seems supported.
new Intl .DateTimeFormat("fr", { year: "numeric", month: "long", day: "numeric" }) .format(new Date())
Expected: 16 août 2023
16 août 2023
Got: August 16, 2023
August 16, 2023
I tried to override the default implementation with a polyfill, with no success, by including this tag (I tried both in head and at the beginning of the body). But it didn't work:
<script src="https://polyfill.io/v3/polyfill.min.js?features=Intl,Intl.Locale,Intl.GetCanonicalLocales,Intl.PluralRules,Intl.PluralRules.~locale.fr,Intl.NumberFormat,Intl.NumberFormat.~locale.fr,Intl.DateTimeFormat,Intl.DateTimeFormat.~locale.fr&flags=always"></script>
Is it possible to configure the available locales and have many loaded at once ?
This is the configuration I am using:
image: zenika/alpine-chrome:102 command: [ chromium-browser, "--single-process", "--no-zygote", "--no-sandbox", "--disable-dev-shm-usage", "--hide-scrollbars", "--headless", "--disable-gpu", ]
I'm trying to use the Intl DateTimeFormat API from the chromium browser, but only the "en-US" locale seems supported.
Expected:
16 août 2023
Got:
August 16, 2023
I tried to override the default implementation with a polyfill, with no success, by including this tag (I tried both in head and at the beginning of the body). But it didn't work:
Is it possible to configure the available locales and have many loaded at once ?
This is the configuration I am using: