[jsword-devel] Rendering of Hebrew

DM Smith dmsmith555 at yahoo.com
Thu Jun 24 10:31:51 MST 2004

While setting dir in an html doc should work. No where in java's 
handling of html does it use the DIR attribute (it does have a constant 
for it and it does parse it correctly. It just is not used anywhere)

Java supports the notion of a components orientation. When applied at 
the top level of an application it changes various layout managers 
ordering of elements to the requested orientation. JDK 1.4 only supports 
LEFT_TO_RIGHT and RIGHT_TO_LEFT (horizontal orientations), but the java 
doc discusses vertical orientations that it does not support.

Anyway, calling 
does render the html elements in their correct order.

One can dynamically get the component orientation from the language
by turning the language into a locale. This is probably the better way 
to go.

So the next trick is to associate a language with each Bible (this is in 
the conf, but I need to check that it is the proper abbreviation 
according to ISO standard that Locale.getLocal(...) uses) and to have 
the JTextPane get it from the bible.

There is a problem in the displaying of tables in html. The column 
ordering is not reversed and the text is left justified, rather than 
right justified. So I may need to pass the ordering into the stylesheet 
and do some manipulation there.

DM Smith wrote:

> I am working on fixing the BHS text ordering bug listed in bugs.txt.
> Currently Hebrew bibles order the characters in a verse from right to 
> left which is correct. The verses are ordered from left to right with 
> the verse number on the left of the verse, both of which are wrong.
> According to HTML 4.0 (http://www.w3.org/TR/html401/struct/dirlang.html) 
> there is an inheritable block level attribute dir="rtl|ltr" which 
> controls this. I have tested this at by adding it to the html element.
> When I view it in an external browser the verses do display in the 
> correct order. However, the JTextArea displays them without regard to 
> the element's value.
> I will be doing some more looking to see what Java can do.
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel

More information about the jsword-devel mailing list