Titanium and localize moment.js

Titanium comes with a standard Moment.js library included. If you want to localize it, you have to require the locale you need. This needs to be done statically! So if you need a Dutch moment.js localization, you explicitly need to require it:


You cannot require it dynamically, because the compiler needs to include it in the build.

To see the available locales, see: