Checking the current Moment.js locale1.6.0+

  1. // From version 2.8.1 onward
  2. moment.locale();
  3. // Deprecated in version 2.8.1
  4. moment.lang();

If you are changing locales frequently, you may want to know what locale is currently being used. This is as simple as calling moment.locale without any parameters.

  1. moment.locale('en'); // set to english
  2. moment.locale(); // returns 'en'
  3. moment.locale('fr'); // set to french
  4. moment.locale(); // returns 'fr'

As of version 2.12.0 it is possible to list all locales that have been loaded and are available to use:

  1. moment.locales()