Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-06-2014, 04:00 PM   #1
Bilingual
Junior Member
Bilingual began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2013
Device: none
Question Any formatting options at all for the text in Kindle's instant dictionary popup?

I have been preparing an Icelandic dictionary with some success. I got the inflections working, which was my main issue. I did not use the tab2opf.py script, but instead used the boilerplate opf from the mobicon website together with an HTML-file created from a database of words with inflections and translations, I've compiled.

In order to increase usability, I would like to offer simultaneous translation to English in addition to my own language. To that end, I would prefer the output of the instant popup formatted somewhat like this:

dictionary-word
English translation
other translation

I have been tinkering with various HTML-codes, but they all seem to only apply to the full dictionary lookup and not to the instant popup, which always render:

dictionary-word English translation other translation

Now, do any text formatting options actually exist that applies to instant popup?


I have another small problem in that a few of my dictionary lookups adds a number of sequential dictionary entries to the same instant popup, despite no apparent formatting errors and no problems with the entries in the full dictionary lookup. Can't really grok that one.

Any pointers would be most welcome.
Bilingual is offline   Reply With Quote
Old 06-21-2014, 12:18 PM   #2
chipf0rk
Member
chipf0rk began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Nov 2013
Location: Germany
Device: Kindle Paperwhite (2nd gen)
Quote:
I have been tinkering with various HTML-codes, but they all seem to only apply to the full dictionary lookup and not to the instant popup, which always render:

dictionary-word English translation other translation

Now, do any text formatting options actually exist that applies to instant popup?
I'm not sure what device you are using. I have a Paperwhite 2nd generation, and tried fiddling with a sample dictionary (the HTML file) a bit now. What I found out is this:
  • <br> and <p> work fine to force line breaks inside one dictionary page. <br> is preferable, because it does not add an indent on the left.
  • You have to use <br>, not <br />. <br /> was heavily misinterpreted by my Kindle and broke the entire parent tag.
  • You can also define multiple pages for one definition, as seen in dictionaries delivered with the Kindle. Doing this manually is easy: Just copy the <idx:entry> tag and the preceding <mpb:pagebreak> tag, and change the content (everything after <h2>, not <idx:orth> and <idx:key>). This will show up as two separate entries in the "full dictionary".

Quote:
I have another small problem in that a few of my dictionary lookups adds a number of sequential dictionary entries to the same instant popup, despite no apparent formatting errors and no problems with the entries in the full dictionary lookup. Can't really grok that one.
If I understand "sequential dictionary entries" correctly, this might be related to my last point above: Maybe you erroneously have duplicate keys for the same word, which will show up separated as pages.

Other than that, I'd be really interested in having the Icelandic-English dictionary in its current state myself, or at least a pointer to the source for your database that includes inflections. I only have a rather bad is-en dictionary at the moment which is auto-generated from dict.cc data and does not support any inflections. I'd be incredibly thankful if you could share your work with me here, as I can't find anything like this anywhere online.

DISCLAIMER: This is based on the manual research of an hour, after not being able to find anything on more knowledgeable sources than myself. What I'm saying might not be 100% correct, but it didn't break anything for me.
chipf0rk is offline   Reply With Quote
Reply

Tags
dictionary output, formatting

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle PW2 3G. Instant translation options over 3G? gthalas Amazon Kindle 6 12-28-2013 01:41 PM
K3 Dictionary popup # of lines option? kaito Kindle Developer's Corner 2 07-07-2013 06:52 PM
Why does the Kindle app have so few formatting options? menevets Apple Devices 8 11-16-2012 05:51 PM
More lines in Dictionary popup window jswinden Amazon Kindle 6 09-29-2011 04:03 PM
dictionary: popup preview Lucas C. Amazon Kindle 8 06-09-2011 05:14 PM


All times are GMT -4. The time now is 12:48 AM.


MobileRead.com is a privately owned, operated and funded community.