i18n, support for right-to-left

Bug #654338 reported by יאַנקל־פּרץ
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Internet Archive BookReader
New
Undecided
Unassigned

Bug Description

It would be great if the text that is output (e.g., tooltips for the buttons, zoom levels) could be changed without having to go into the BookReader.js file.

Also, there could be support for the reader to be in a right-to-left language. This would involve just a few changes in the css file and BookReader.js to adjust the order of the buttons and text at the top. Also, the graphic for the play button could be switched -- actually, maybe this should be done for any right-to-left book even if the language of the interface in left-to-right.

Revision history for this message
raj (raj-archive) wrote :

The bookreader already does support right-to-left language books. For example, you can view many books from the National Yiddish Book Center here: http://www.archive.org/details/nybc200109

We still need to work on other internationalization issues..

Revision history for this message
mangtronix (mang) wrote :

We'd like to make it easy to internationalize the UI. Unfortunately we aren't quite there yet.

Note that it is technically possible to modify the toolbar tooltips without changing BookReader.js. You could modify the tooltips after calling BookReader.init

Basically after you call BookReader.init you could do something similar to this to override the values that were previously set:
http://github.com/openlibrary/bookreader/blob/master/BookReader/BookReader.js#L3164

That wouldn't quite get everything in the UI though. It would be great to have all the UI strings in a file to make it easier to add new languages.

  - mang

tags: added: i18n
removed: i8n
summary: - i8n, support for right-to-left
+ i18n, support for right-to-left
Revision history for this message
יאַנקל־פּרץ (yak2718) wrote :

Raj -- thanks! Actually, it was the National Yiddish Book Center's archive that inspired me to use BookReader for my own project, the digitization of four decades of the journal "Yugntruf" in Yiddish. I'm very grateful for the right-to-left support in BookReader!

My only (almost trivial) comment was that the "play" button for making the pages flip on their own looked a bit funny to me pointing to the right if the pages are flipping to the left. So I flipped the button in a graphics editor (now the shadow's on the wrong side but that's getting pretty nitpicky.)

What I was talking about more generally though was changing the UI to a right-to-left language as well, which I'm doing in my case as I'd like the UI to be in Yiddish. You can see a preview of the project I'm doing here:
http://yugntruf.org/zhurnal/zhurnal.php?numer=26#page/1/mode/2up

Mangtronix -- Thanks for the idea! I will try making the changes to the text outside of the BookReader.js file so I don't have to redo them every time I upgrade (until the internal variables change!). As you can see in the link above I changed all the text in the UI except for the words "width", "height" and "auto", where I was afraid of messing something else up since I didn't really understand the code. I also had to reverse the order of the rightmost, right, left, leftmost icons since when their order was switched automatically by adding dir='rtl' to <body> (and/or when I changed the HTTP header to rtl), since they looked silly that way. So maybe there could be a conditional order if the code can detect which direction the page is in? (or something like that)

Thanks so much for this great project!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.