While I am writing a format and parse engine, I would like to find out - given a j.u.Locale, if the general text orientation is right-to-left (letter chars). What I have seen is:
1.) Character#getDirectionality(char) This requires the knowledge of the concrete char to be parsed which is not always easy due to possible fill chars.
2.) java.awt.ComponentOrientation#getOrientation(Locale) This method has two problems for me. First I would not like to be dependent on awt or other gui libraries (anticipating a possible later modularization of Java). Second and more important: The implementation of this method in OpenJDK and Android just use a very simple approach, namely: If the language is one of (ar, fa, iw, ur) then the method says RIGHT_TO_LEFT. But looking at Wikipedia-ISO-639 it appears that there are more languages which have a right-to-left-orientation, for example the ISO-639-code 'he' (hebrew).
So my question now is, do you know a better approach? At the moment I tend just to use the Wikipedia list, that is, to refine the java.awt.ComponentOrientation approach with a better language list.