code: function (translationId) {
  
            // Remove any old watcher
            if (angular.isFunction(observeElementTranslation._unwatchOld)) {
              observeElementTranslation._unwatchOld();
              observeElementTranslation._unwatchOld = undefined;
            }
  
            if (angular.equals(translationId , '') || !angular.isDefined(translationId)) {
              // Resolve translation id by inner html if required
              var interpolateMatches = trim.apply(iElement.text()).match(interpolateRegExp);
              // Interpolate translation id if required
              if (angular.isArray(interpolateMatches)) {
                scope.preText = interpolateMatches[1];
                scope.postText = interpolateMatches[3];
                translationIds.translate = $interpolate(interpolateMatches[2])(scope.$parent);
                var watcherMatches = iElement.text().match(watcherRegExp);
                if (angular.isArray(watcherMatches) && watcherMatches[2] && watcherMatches[2].length) {
                  observeElementTranslation._unwatchOld = scope.$watch(watcherMatches[2], function (newValue) {
                    translationIds.translate = newValue;
                    updateTranslations();
                  });
                }
              } else {
                translationIds.translate = iElement.text().replace(/^\s+|\s+$/g,'');
              }
            } else {
              translationIds.translate = translationId;
            }
            updateTranslations();
          }
docs: Ensures any change of the attribute "translate" containing the id will be re-stored to the scope's "translationId". If the attribute has no content, the element's text value (white spaces trimmed off) will be used.