7. The method of claim 1 , wherein detecting the orientation attribute further comprises dividing the text into a set of words, and for each word, identifying a Latin word letter case of a first letter in a non-Arabic script word and the Latin letter case of a last letter in the non-Arabic script word in said text, if the text contains no word starting with an initial letter shape and ending with a final letter shape and no word starting with a final letter shape and ending with an initial letter shape.
7. The method of claim 1 , wherein detecting the orientation attribute further comprises dividing the text into a set of words, and for each word, identifying a Latin word letter case of a first letter in a non-Arabic script word and the Latin letter case of a last letter in the non-Arabic script word in said text, if the text contains no word starting with an initial letter shape and ending with a final letter shape and no word starting with a final letter shape and ending with an initial letter shape. 8. The method of claim 7 , further comprising: setting the orientation attribute to an RTL value if a word is detected as starting with the final letter shape and ending with the initial letter shape; and setting the orientation attribute to an LTR value if the word is detected as starting with the initial letter shape and ending with the final letter shape.