function postDigestTaskFactory() {
      var postDigestCalled = false;
      return function(fn) {
        // we only issue a call to postDigest before
        // it has first passed. This prevents any callbacks
        // from not firing once the animation has completed
        // since it will be out of the digest cycle.
        if (postDigestCalled) {
          fn();
        } else {
          $rootScope.$$postDigest(function() {
            postDigestCalled = true;
            fn();
          });
        }
      };
    }
@ngdoc function
@name pascalprecht.translate.$translate#resolveClientLocale
@methodOf pascalprecht.translate.$translate

@description
This returns the current browser/client's language key. The result is processed with the configured uniform tag resolver.

@returns {string} the current client/browser language key