A method and system are provided for locating specific text in a selection
of text and ensuring that the specific text is rendered in the proper
order relative to other text in the selection of text according to the
text rendering rules of the language to which that text belongs.
Previously typed text belonging to a language, such as Hebrew, requiring
text to be rendered according to bi-directional text rendering rules is
scanned to detect characters or strings or characters that need to be
ordered according to a specific configuration, such as left-to-right
reading order. Once such text is detected, that text is marked and
rendered or displayed in the specific configuration, for example,
left-to-right reading order, regardless of the reading order of the
surrounding text.