code: function getLocale(lang) {
    lang = lang.toLowerCase();
    if (!locales.hasOwnProperty(lang)) {
      locales[lang] = {};
      try {
        locales[lang] = require('../locale/' + lang);
      } catch (err) {
        if (lang !== 'en') {
          return getLocale('en');
        }
        // This is not reachable, unless someone deletes ../locale/en.json
        throw err;
      }
    }
  
    return locales[lang];
  }
docs: <editor-fold desc="Internal Functions">