code: function getTextDirection(text) {
  		bidiLayout = getBidiLayout();
  		if (!isBidiEnabled()) {
  			return "";
  		}
  		if (bidiLayout === "auto" && util.isIE) {	//$NON-NLS-0$
  			return checkContextual(text);
  		}
  		return bidiLayout;
  	}
docs: returns text direction.
  this method is used for handling direction by adding a dir attribute in an HTML element.
  if bidiLayout is set to ltr > return ltr
  if bidiLayout is set to rtl > return rtl
  if bidiLayout is set to auto > check for first strong character in text and return ltr or rtl accordingly.
  @param {String} the text on which to set directionality
  @returns {String} text direction. rtl or ltr.