TDM

How to create a bilingual book from 2 epub/txt files

Recently, I wanted to learn Spanish by reading a bilingual book, but the book I wanted to read didn’t exist in a bilingual version.

So I bought the ebooks in Spanish and French on Amazon

To handle the text easily, I converted them to TXT format (I already explained here how to remove DRM with an old Kindle version and PDF Mate ebook Converter). I recommend using .txt because it allows you to clean the files properly before creating your bilingual book, and the files will be smaller.

Then, I used Youalign https://youalign.com/ to upload the two TXT files. It’s free, you just need to create an account. It’s a tool originally designed to check translations and ensure everything has been translated, but it’s very useful for us to make bilingual books.

Note that each file must be under 1MB, hence the advantage of having txt files.

Youalign will find matches automatically and align each block, even when the layouts and text breaks of the two files are different. You can have a preview before exporting.

I recommend exporting in the format htm

You can see that unlike the preview, in the final file, they put [ESP] and [FR] at the beginning of each sentence and [~] at the end of the French translation.

You can open the htm in Notepad and do a Ctrl+H to replace all [ESP][FR] and [~] with nothing. I use Sublime Text because it’s more visual, but Notepad will work fine.

Then, you’ll see that your htm looks nicer all of a sudden.

To export it to PDF, it’s very simple, just do Ctrl+P like for printing, and you can choose to export it as PDF and adjust all the margins you want.

And here’s the final file:

Comments Off on How to create a bilingual book from 2 epub/txt files