forwardemail / email-templates

Create, preview (browser/iOS Simulator), and send custom email templates for Node.js. Made for @forwardemail, @ladjs, @cabinjs, @spamscanner, and @breejs.
https://forwardemail.net/docs/send-emails-with-node-js-javascript
MIT License
3.66k stars 339 forks source link

Adding custom locale types #397

Closed Hopson97 closed 4 years ago

Hopson97 commented 4 years ago

Hi there,

I was wondering if it is possible to add customisable locale codes for this package? For example, the locale es-LA is invalid for use but is it possible to create a custom locale type so that it can be used?

Thanks!

niftylettuce commented 4 years ago

Not right now. You'd have to make a PR to @ladjs/i18n to use something custom for validation instead of what we use, which isi18n-locales.

https://github.com/ladjs/i18n/blob/eed5ec08067eaad29e53dddd999f590d5acc5906/src/index.js#L6 https://github.com/ladjs/i18n/blob/eed5ec08067eaad29e53dddd999f590d5acc5906/src/index.js#L57-L63

Hopson97 commented 4 years ago

Ah OK no worries, thanks anyways.