-
Notifications
You must be signed in to change notification settings - Fork 191
Add full-icu internationalization support in Node builds #224
Comments
@bcomnes , just want to bring attention to this. Is it possible to allow custom node flags via environment variables that are used during node installation? I know we allow NPM_FLAGS . |
Is there a way to have nvm install a node version with |
This would be really useful. Currently, to show dates in French using Luxon with Eleventy, I have a (really) dirty hack: eleventyConfig.addFilter("displayDate", function(date) {
return DateTime.fromJSDate(date, { zone: "Europe/Paris" })
.setLocale("fr")
.toLocaleString(DateTime.DATE_FULL)
.replace(/([0-9]{4}) (M[0-9]{2}) ([0-9]{2})/, "$3 $2 $1")
.replace(/M01/, "janvier")
.replace(/M02/, "février")
.replace(/M03/, "mars")
.replace(/M04/, "avril")
.replace(/M05/, "mai")
.replace(/M06/, "juin")
.replace(/M07/, "juillet")
.replace(/M08/, "août")
.replace(/M09/, "septembre")
.replace(/M10/, "octobre")
.replace(/M11/, "novembre")
.replace(/M12/, "décembre");
}); Source here: https://github.com/nhoizey/precious-prana.com/blob/master/.eleventy.js#L14-L31 |
As an alternative, would it be possible (I really don't know how it works) to have |
I had the same problem when testing Install dependency:
Change the
to:
So, |
How to execute |
Please note that since Node 13, |
I can confirm it now works on Netlify, I've been able to remove my horrible hack! 👍 |
Uh oh!
There was an error while loading. Please reload this page.
If Netlify customers want to work with locales in Node, they'll need to have
full-icu
support installed, and Node does not ship with this by default. Only en-US is provided, although there have been discussions to include full-icu by default..Support, in theory, can be added by using the npm package full-icu but it does not seem to play nicely with NVM, and it requires an environment variable or command line switch to work (disclosure: I can't get it to work).
Would it be realistic to either: build all versions of Node with full-icu support e.g.
--with-intl=full-icu
and live with the extra 15MB or so that it will add to the binary, or provide an option to build a version of Node with it included?The text was updated successfully, but these errors were encountered: