code: function (newLocale) {
          if (config.storageMethod !== 'custom') {
            switchMethods[config.storageMethod].save(config.storageKey, newLocale, savedLocale, config.cookieExpirationInDays);
          } else {
            config.storageFunctions.save(config.storageKey, newLocale, savedLocale);
          }
        }
docs: Helper for saving the new locale.