code: function (fallbackLanguageIndex, translationId, interpolateParams, Interpolator, defaultTranslationText) {
          var deferred = $q.defer();
  
          if (fallbackLanguageIndex < $fallbackLanguage.length) {
            var langKey = $fallbackLanguage[fallbackLanguageIndex];
            getFallbackTranslation(langKey, translationId, interpolateParams, Interpolator).then(
              deferred.resolve,
              function () {
                // Look in the next fallback language for a translation.
                // It delays the resolving by passing another promise to resolve.
                resolveForFallbackLanguage(fallbackLanguageIndex + 1, translationId, interpolateParams, Interpolator, defaultTranslationText).then(deferred.resolve);
              }
            );
          } else {
            // No translation found in any fallback language
            // if a default translation text is set in the directive, then return this as a result
            if (defaultTranslationText) {
              deferred.resolve(defaultTranslationText);
            } else {
              // if no default translation is set and an error handler is defined, send it to the handler
              // and then return the result
              deferred.resolve(translateByHandler(translationId));
            }
          }
          return deferred.promise;
        }
docs: @name resolveForFallbackLanguage
  @private
  
  Recursive helper function for fallbackTranslation that will sequentially look
  for a translation in the fallbackLanguages starting with fallbackLanguageIndex.
  
  @param fallbackLanguageIndex
  @param translationId
  @param interpolateParams
  @param Interpolator
  @returns {Q.promise} Promise that will resolve to the translation.