Not everyone is happy with the Oxford Dictionary delivered on Amazon’s Kindle. I will show you how to create your own free Kindle dictionary for every language. All you need comes free (and totally legal) from open sources.
Advantages
- you don’t have to install any software, no Python stuff, no big generator installations.
- you can chose every language you like as long as there are database sources in text format available (the common download format for it in the internet)
- it only takes about 30 minutes to generate a dictionary with 800.000 entries
What we need
- a dictionary database in tab delimited file format (<word>TAB<translation>). I advice you to download a fresh one from dict.cc which as to my experience currently has the biggest free (for personal use) database and the widest selection of languages. Name the file „dict.txt„
- The following package of files to generate a opf file
- The newest version of Amazon’s mobigen to generate the dictionary itself in the final step
Step by Step instruction
1. Unpack and open the downloaded file with an text editor (not with a word processor). You should give notepad++ a try.
2. Delete the comment header and the empty line at the beginning of the file.
3. Put all the files (dict.txt, package files and mobigen.exe) together in one folder
4. Open a command line window and execute the following command:
tab2opf.exe dict.txt
This generates dict.opf and a bunch of html files. It will take about 5-10 minutes depending on your machine.
5. Generate a 600×800 pixel sized cover image (cover.jpg) or you will get a warning message. Take an empty picture if you are not in the mood for drawing.
6. Open the new dict.opf with the editor and change/edit the title and input respectively output language (e.g. en or de). You can edit additional meta data (information link below) to your needs as well. Insert information for a cover:
<meta name="cover" content="my-cover-image" /> ... <manifest> ... <item href="cover.jpg" id="my-cover-image" media-type="image/jpeg" /&> ... </manifest>
6. Back to the command line:
mobigen.exe dict.opf
This generates the dictionary dict.mobi. It will take about another 5-10 minutes. You can ignore the warnings, it will still work. If you want to get rid of the warnings and generate a dictionary with cover, title page and an instruction have a closer look at my screen shot where indicated yellow.
Installation on your Kindle:
- Transfer the generated file (dict.mobi) to the documents folder on your Kindle
- Press Menu
- Select Settings
- Press Menu again
- Select Change Primary Dictionary
- Select your new dictionary
You can find more information on this topic here:
- http://www.mobipocket.com/dev/ – Developers of file format
- http://s3.amazonaws.com/kindlegen/ – Amazon Kindle Publishing Guidelines
- http://blog.mikeasoft.com/ – an alternative instruction
- http://www.a-z-dictionaries.com/ – starting point to find alternative database sources
- http://www.pogona.net/wp/ – another good tutorial
- http://www.lingoes.net/en/ – search for alternative databases
- http://idpf.org/epub/ – more information on how the add meta data to your book like author, publishing date or description
I have utf-8 txt file in Serbian language, bat after compailing lost caracters.
Have a close look at what the kindle compiler is printing out.
It should work, I use UTF-8 for German language also.
But you have to make sure that EVERY file is UTF-8
I have a Kindle of android, downloaded two French-English dictionaries, but when I follow the instructions to change the default, it doesn’t change. I know I am getting to the right place because I can change back & forth between the two English dictionaries that came with my Kindle, but for some reason it won’t work with the French-English dictionaries. I’ve seen several comments that these books are working for some Kindle users but for many it isn’t. Any ideas would be appreciated.
Wow, this works. Thank you very much!!! Is it possible to remove the pagebreak after each entery? Remove the ?
Why do you want it to be removed?
thanks for this tutorial, it works, however I only get one word-pair on every page in my kindle, is there any possibility to sort it out?
Hello, Emilio,
Yes, there is a work around. You have to seperate different translations by comma. E.g.
This should work
Hi,
I have an error in the command window to execute command <>
“ Traceback :
File „tab2opf.py, line 240, in
ValueError: need more than 1 value to unpack“
Please tell me what am I doing wrong…
thanks, Irina
I’ve the same problem …
Can anyone help us?
Hi,
I have an error in the command window to execute command „“tab2opf.exe dict.exe““
” Traceback : (most recent call last):
File “tab2opf.py“, line 240, in (module)
ValueError: need more than 1 value to unpack”
Please tell me what am I doing wrong…
thanks, Irina
I got the same error.
tab2opf did stop somewhere at first letter N. This happens if there is no translation available, just one word in the line.
The error message „need more than 1 value to unpack“ tries to point it out.
tab2opf shows the last successful word before the error occurs. Search this word in the dict.txt file and the next line should be causing the problem. Delete this line.
Hello, Peter,
thanks for helping us.
Juergen
I have a similar error:
File “tab2opf.py”m line 242 in module
File “tab2opf.py”m line 103, in normalizeUnicode
UnicodDecodeError: ‘utf8’ codec can’t decode byte 0x84 in position 1: unexpected code byte
Anyone can help me?
Thank you
David
Thank you for this tutorial. You made it much more easier without phyton stuff. But I ma having some weird problem. I’m trying to make a Japanese-Engish dictionary, my dictionary data is delimited and saved in utf-8 but when I run tab2opf.exe, instead of Japanese characters, only weird numbers shows up. Do you know the problem?
I’m having the same problem with a Japanese-English dictionary. Has anyone found a solution?
Thanks.
I have the same problem with trying to compile a Korean-English dictionary. It’s UTF-8..seems the script can’t handle Unicode or something?
I would be immensely thankful if someone could compile it for me!
Here’s a link to the stardict file, and my try to delimit it: https://drive.google.com/file/d/0Bwz5TqY3G9nFSTE0MlhlZGtLbUk/edit?usp=sharing
Open dict.txt and search for the last printed word before the error.
Next to it there will be some text that is not following the pattern – remove it. Example:
aaa noun bbb
noun
ccc verb ddd
I removed separate ’noun‘ from a single line and saved the file.
And what about inflection? For instance „make, makes, made“
Sorry, but that won’t do as long as they are not separately mentioned.
Mr. Schultze,
do you know a good greek english, or greek french dictionary database already in the tab delimited format? Dict.cc’s is not good.
To my knowledge there is no greek kindle dictionary properly working.
Danke.
Ok, I saw your message about support. I really respect it.
Thanks for your help on the text.
I’d pay to have an ancient greek english dictionary. The ones there are are not good.
Hi,
first of all nice guide!
However, I have converted and changed the language (Italian) in the .opf-file, but on my paperwhite the dictionary still appears in the section English dictionaries. How can I fix this?
Did you changed „en“ to „it“?
Maybe you can try creating an english dictionary to see if you are doing something else wrong.
Thank you very much Jürgen,
I created a little glossary for my kindle according to your instructions and it works perfectly fine. At first I had problems with querying the dictionary, which turned out to be caused by leaving the empty line on top of the database before creating an .opf-file with mobigen. There is one thing I do have problems with, however, and perhaps I’m not alone. Keeping your wish not to give free counselling in mind, I hope that one of the co-readers has experience with it. I created an entry in my custom dictionary called: I’m glad, but the phrase appears in my book in quotation marks and has an exclamation mark attached to it: „I’m glad!“ . I also can’t highlight only the words between the punctuation marks since my kindle automatically also hightlights „…!“. My query remains unsuccessful and all I get is a flicker of the screen. Is there any way around this?
I can’t go throught the 4 step! Cmd is talking something like: „name ‚tab2opf.exe‘ isn’t recognisable as…“ ;(
Pingback: Kindle Dictionary Guide: How to Add, Change, and Create Custom Kindle Dictionaries | The eBook Reader Blog
@Gramszu
This might solve the problem:
Open the CMD line.
Drag tab2opf.exe onto command line window; hit the space bar
Drag dict.txt onto command line window; hit enter and it will work through the file.
Thank you very much for this blog. I made it with the dict.txt file and everything worked just fine.
Now I want to use this method to make more dictionaries usable. My idea is to bring them just in the same form as the dict.txt file and then to do all the same procedures with them.
But now I want to add special things:
1. I want to add Translations, that have line breaks and paragraphs. How is that possible in the .txt document? If I understood it right the line breaks are allready used as the Key-Symbol for a new word.
2. I want to add hyperlinks to link between the entries
3. Not really necessary but it would also be great to programm basic formatting in the .txt file like bold, italic and underlined
(How) Are these things possible?
If you are trying to compile a dictionary for a language with non-English characters, the following might be useful:
instead of using tab2opf.exe, get the python script from here:
http://www.klokan.cz/projects/stardict-lingea/tab2opf.py
in step 2, make sure you save the file in utf-8 (or utf8) encoding
replace step 4 with
python tab2opf.py -utf8 dict.txt
in step 6, add the line that specifies the output encoding to be utf-8 (in addition to changing the language codes), so that the metadata tag might look like this (but with appropriate language codes)
<x-metadata>
<output encoding="UTF-8" flatten-dynamic-dir="yes"/>
<DictionaryInLanguage>cs</DictionaryInLanguage>
<DictionaryOutLanguage>de</DictionaryOutLanguage>
</x-metadata>
Note that mobigen does not recognize all existing language codes, so you might have to use a code of a different language (e.g., I use Italian for my Latin dictionaries); a list of recognized codes can be found here: http://www.mobileread.com/forums/showpost.php?p=2453537&postcount=2
now run mobigen as usual
For those who got problem with UTF8 use the option -utf: tab2opf.exe -utf
I’ve managed to create the otf and htm files in utf-8 but mobigen gets stuck trying to build them and generates nothing. If I don’t use utf-8 encoding it works fine. Can anybody help?
when i search „arrived“, i want the dictionary show „arrive“ with definition
i already tried adding more tag in html file, but it doesn’t work.
Do you know how to make it?
it says when i add the command: „‚tab2opf.exe‘ is not recognized as an internal or external command, operable program or batch file. “
what should i do?
I followed your tutorial, and everything works great! Now my Kindle have English to Croatian dictionary.
Thank you!
One question. Do you know where I can find bigger dictionary database, because the one from dict.cc have only 10000 words?
Hi Jürgen
Since Mobipocket is no longer available, is there an alternative way to come up with a self made dicitonary? I’m currently struggling hard to create an Indonesian-English dictionary. Many Thanks!
https://www.amazon.com/gp/feature.html?docId=1000765211
Use KindleGen
Awesome 🙂
Just one question where can i get a data base for english to hindi dictionary database ?
I know it’s an old post, but in my case tab2opf had encoding problems with cyrillic – my Bulgarian words were shown as a series of digits of the like of: „52181723898“.
I tried with an „updated“ version from apeyser on github, but it stops at UnicodeEncodeError: ‚charmap‘ codec can’t encode characters in position 1-15: character maps to
without producing any html files
Hello, Jordan!
Do you have a successes with Bulgarian dictionary. I have kindle 8th generation and I am having problem with that dictionary. Here from this site one of the steps is missing right now, so it looks that is unable to create dictionary…
Sorry that I am writing to you in English, because of the site…
Hi, the mobigen executable is no longer available from amazon. However, the Wayback Machine at archive.org has a copy:
http://web.archive.org/web/20070306012409/http://www.mobipocket.com/soft/prcgen/mobigen.zip
it worked for me.
There is a typo in the snippet that is supposed to be copied.
should be
otherwise I get the following error:
Error(opfparser): the id in the spine does not match any item in the manifest: dictionary0
This worked 😉
I managed to make english-finnish dictionary (I’ll just need to redo it with better data than .cc has).
note: it is impossible to see what metadata you edited since pictures are in slide show mode. can you please add it to page as plain text, as well the in/out dictionary metadata + utf.
I also tried to edit the .mobi with calibre but result did not work as a dictionary at kindle.
Any body knows how to remove the dictionary option after I removed the .mobi from kindle ?
I would not like to have all versions at dictionary selection.
BTW:
dictionary format defination is here (start at page 70):
https://s3.amazonaws.com/kindlegen/AmazonKindlePublishingGuidelines.pdf
but looks like a lot of work to do all that stuff.
Hi,
How to get mobigen file?
I want to add a thesaurus on my kindle and I cant find out what to do
Pingback: Bangla Dictionary for Kindle
Here is a python script I just created that works to convert a word list stored in MySQL into a kindle dictionary for the Palauan language: https://github.com/tekinged/tekinged.com/blob/main/scripts/mk_kindle_dict.py