function resolve() {
          deferred.resolve();
          $rootScope.$emit('$translateRefreshEnd', {language: langKey});
        }
@ngdoc function
@name pascalprecht.translate.$translate#refresh
@methodOf pascalprecht.translate.$translate

@description
Refreshes a translation table pointed by the given langKey. If langKey is not specified,
the module will drop all existent translation tables and load new version of those which
are currently in use.

Refresh means that the module will drop target translation table and try to load it again.

In case there are no loaders registered the refresh() method will throw an Error.

If the module is able to refresh translation tables refresh() method will broadcast
$translateRefreshStart and $translateRefreshEnd events.

@example
// this will drop all currently existent translation tables and reload those which are
// currently in use
$translate.refresh();
// this will refresh a translation table for the en_US language
$translate.refresh('en_US');

@param {string} langKey A language key of the table, which has to be refreshed

@return {promise} Promise, which will be resolved in case a translation tables refreshing
process is finished successfully, and reject if not.