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

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 05-05-2016, 04:26 PM   #1
surquizu
Addict
surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.
 
surquizu's Avatar
 
Posts: 399
Karma: 883651
Join Date: Jun 2008
Location: Zaragoza (Spain)
Device: prs-505, kobo auraHD, kobo auraH2O, kobo Glo HD, kobo aura ONE
New dictionaries for kobo (no limits)

Step by step to install new dictionaries in kobo readers. It serves for dictionaries of another languages and install additional dictionaries of languages installed.

Inspired by the contributions of Robik and Pipcat in https://www.mobileread.com/forums/sho...30#post3311930

You must search dictionaries in kobo format. See in https://www.mobileread.com/forums/sho...ght=dictionary or prepare with Penelope (https://github.com/pettarin/penelope).

1.- Patch the libnickel.so.1.0.0 file with the method Metazoa patchs (https://www.mobileread.com/forums/sho...d.php?t=260100).
Edit the file libnickel.so.1.0.0.patch and adding the following patch (multi-firmware patch):

Spoiler:
<Patch>
patch_name = `Allow searches on Extra dictionaries`
patch_enable = `yes`
#
# To allow searches on Extra dictionaries change space character at end of "Extra: " to another char (ex: "Extra:_")
# The space char causes a non-desired "English - English" when searching on Extra dictionary from main menu.
#
#replace_bytes = BA9478, 20, 5F
#
find_base_address = `\0E\0x\0t\0r\0a\0:\0\x20`
replace_string = 000d, `\x20`, `_`
</Patch>


2.- We need a two chars code for each dictionary. If language doesn't exists on Kobo we can use its ISO-639-1 (Ex: Catalan => ca. Euskera => eu), otherwise we will assign a new fictitious code (Ex: English => e1, e2 . Spanish => s1)


3- Edit \.kobo\Kobo\Kobo eReader.conf and fill ExtraLocales=xx in [ApplicationPreferences] seccion with the two chars code of the dictionaries to install (separate with commas)

ExtraLocales=ca, e1, e2, s1, eu




4.- Copy dictionary files to \.kobo\dict

You have to name the files with the file structure of kobo dictionaries with the two chars code.

dicthtml-ca.zip, dicthtml-e1.zip, dicthtml-e2.zip, dicthtml-s1.zip, dicthtml-eu-es.zip



5- Open the SQLite database \.kobo\KoboReader.sqlite and insert rows on Dictionary table with adequate editor. I use the free SQLite Expert.

Select File> Open DataBase. Insert a row for each dictionary on Data seccion of Dictionary table. Select "+" and fill the form:

- Suffix: file name of the dictionary without dicthtml
- Name: write the name of the dictionary you want. I put the two chars code and description.
- Installed: Leave it selected
- Size: The size in bytes of the file of the dictionary. You can get on the properties of the file (right click)
- LastModified: write (null)
- IsSynced: Leave it selected

Save with "OK" and close the database with File>Close Database

- s1 - Español (DRAE)
- e1- English (WordNet)
- e2 - English - Español (Harrap's)
- ca - Català
- eu - Euskera-Español





6.- Safely disconnect the reader and restart.
You have the new dictionaries.
You can use on the book and from the menu dictionary of the home







Attached Thumbnails
Click image for larger version

Name:	3_453x600.png
Views:	121
Size:	15.1 KB
ID:	148459   Click image for larger version

Name:	4_453x600.png
Views:	1372
Size:	30.5 KB
ID:	148460   Click image for larger version

Name:	5_453x600.png
Views:	1376
Size:	115.0 KB
ID:	148461   Click image for larger version

Name:	6_453x600.png
Views:	124
Size:	123.6 KB
ID:	148462   Click image for larger version

Name:	1_453x600.png
Views:	1447
Size:	38.5 KB
ID:	148463   Click image for larger version

Name:	2_453x600.png
Views:	1371
Size:	42.6 KB
ID:	148464   Click image for larger version

Name:	7_453x600.png
Views:	151
Size:	123.7 KB
ID:	148465   Click image for larger version

Name:	10_600x290.jpg
Views:	1461
Size:	39.7 KB
ID:	148466   Click image for larger version

Name:	11_600x286.jpg
Views:	1446
Size:	30.2 KB
ID:	148467   Click image for larger version

Name:	12_525x600.jpg
Views:	1440
Size:	28.7 KB
ID:	148468   Click image for larger version

Name:	13_591x600.jpg
Views:	1458
Size:	78.6 KB
ID:	148469  

Last edited by surquizu; 05-05-2016 at 05:12 PM.
surquizu is offline   Reply With Quote
Advert
Old 05-06-2016, 03:16 AM   #2
MGlitch
Guru
MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.
 
Posts: 640
Karma: 2311856
Join Date: Aug 2014
Device: Kobo H2O, Kobo Aura One
I can not get this to work properly.

I opted, after a few failed attempts, to do a factory reset. I followed the above to the letter.

The result?

Multiple extra: e1 or e2 entires, even a blank Extra entry, and a duplicate English entry. The ones that do anything display what the built in English dictionary displays. The ones that do not work properly inform me that I do not have an English language dictionary installed.

Yes I patched, loaded the dictionaries and named them properly with dicthrml-e1 and dicthtml-e2. I added ExtraLocales=e1, e2 to the config file. And I updaed the sqlite file using the sqlite manager for firefox which I believe Pin said they used.


edit- I've resolved the multiple entries issue, so I'm now down to Extra: e1, and Extra: e2. The dictionaries appear to be installed when I go into Settings>Language, they appear as the names I gave them (Websters, and Chambers) when editing the sqlite file. Both these dictionaries should work as they are provided here on mobilereads for Kobo, and indeed I have used them before using the previous method of using a different language that was already available.

Last edited by MGlitch; 05-06-2016 at 03:51 AM.
MGlitch is offline   Reply With Quote
Old 05-06-2016, 03:47 AM   #3
surquizu
Addict
surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.
 
surquizu's Avatar
 
Posts: 399
Karma: 883651
Join Date: Jun 2008
Location: Zaragoza (Spain)
Device: prs-505, kobo auraHD, kobo auraH2O, kobo Glo HD, kobo aura ONE
Quote:
Originally Posted by MGlitch View Post
I can not get this to work properly.

I opted, after a few failed attempts, to do a factory reset. I followed the above to the letter.

The result?

Multiple extra: e1 or e2 entires, even a blank Extra entry, and a duplicate English entry. The ones that do anything display what the built in English dictionary displays. The ones that do not work properly inform me that I do not have an English language dictionary installed.

Yes I patched, loaded the dictionaries and named them properly with dicthrml-e1 and dicthtml-e2. I added ExtraLocales=e1, e2 to the config file. And I updaed the sqlite file using the sqlite manager for firefox which I believe Pin said they used.
Can you confirm that the names of the dictionaries in the popup menu? is Extra: _e1 or Extra: e1 (with or without "_")?
surquizu is offline   Reply With Quote
Old 05-06-2016, 04:13 AM   #4
MGlitch
Guru
MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.
 
Posts: 640
Karma: 2311856
Join Date: Aug 2014
Device: Kobo H2O, Kobo Aura One
Extra: e1 is the format that appears. I just tried using ca and ru to test, and while they still change what appears in the dictionary menu when looking up a book, the error is the same.

I also just tried disabling the patch, which had no affect that I can see.
MGlitch is offline   Reply With Quote
Old 05-06-2016, 05:35 AM   #5
surquizu
Addict
surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.
 
surquizu's Avatar
 
Posts: 399
Karma: 883651
Join Date: Jun 2008
Location: Zaragoza (Spain)
Device: prs-505, kobo auraHD, kobo auraH2O, kobo Glo HD, kobo aura ONE
Quote:
Originally Posted by MGlitch View Post
Extra: e1 is the format that appears. I just tried using ca and ru to test, and while they still change what appears in the dictionary menu when looking up a book, the error is the same.

I also just tried disabling the patch, which had no affect that I can see.

If appers Extra: e1 (without "_") is because you have not applied the patch. That is why it does not work. You can try to put the next patch (only for 3.19.5761)

Code:
<Patch> 
patch_name = `Allow searches on Extra dictionary` 
patch_enable = `yes` 
# 
# To allow searches on Extra dictionary change space character at end of "Extra: " to another char (ex: "Extra:_") 
# The space char causes a non-desired "English - English" when searching on Extra dictionary from main menu. 
# 
replace_bytes = BA9478, 20, 5F 
</Patch>
Upload the patch prepared for 3.19.5761. Attention: this file only applies the "Extra: _" patch, if you have applied other patches, they disappear.
Attached Files
File Type: rar KoboRoot 3.19.5761.rar (5.61 MB, 48 views)

Last edited by surquizu; 05-06-2016 at 05:40 AM.
surquizu is offline   Reply With Quote
Advert
Old 05-06-2016, 06:01 AM   #6
pipcat
Connoisseur
pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.
 
Posts: 65
Karma: 200153
Join Date: Apr 2016
Device: Kobo Glo Hd
MGlitch, are you on fw 3.19.5761 ? I only tested the patch with this version.
If you see "Extra: e1" patch is not applied, otherwise you should see "Extra:_e1".
That space character causes the error when searching. The patch should change that space (\x20) to '_'.
pipcat is offline   Reply With Quote
Old 05-06-2016, 08:11 AM   #7
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 3,886
Karma: 7424156
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, Kobo AuraHD/Aura6"/AuraH2O/GloHD/AuraOne
@pipcat, surquizu

I'm still on FW 3.19.5613. I can confirm the original patch, as shown in post #1, works fine for me.

Great work, guys, karma coming your way .

I've been able to move all my non-Kobo Eng-Eng dictionaries into Extras instead of pseudo-renaming them to masquerade as the (unused by me) monolingual German, French etc default dictionaries. Hopefully this will mean that, on the rare occasion when I let Kobo Desktop sync my devices, it won't keep overwriting them with the official versions.

Just for fun (I really need to get out more!) I also created from scratch a small extra dictionary from the terms found in the Glossaries of the first 2 books in the Robert Jordan Wheel of Time series. The dictionary pop-ups are certainly more convenient than having to constantly turn to the Glossary at the back of the book. There are some limitations, because I don't think there's a way of looking up multiple words as a phrase. I had to work round it by adding 2 entries for 2-word terms, etc. Only time will tell whether it was worth the manual effort involved in creating the dictionary contents.

Last edited by jackie_w; 05-06-2016 at 08:14 AM.
jackie_w is offline   Reply With Quote
Old 05-06-2016, 09:54 AM   #8
MGlitch
Guru
MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.
 
Posts: 640
Karma: 2311856
Join Date: Aug 2014
Device: Kobo H2O, Kobo Aura One
Huzzah, success!

Tried the patch built only with this patch enabled, and that worked. So I went back and downloaded a fresh copy of the patch file from Geoff, and set it up. Everything works as advertised.

Jackie, would you mind sharing the WoT dictionary you created? If that's allowed, not sure if it would violate a license or not.
MGlitch is offline   Reply With Quote
Old 05-06-2016, 03:00 PM   #9
Terisa de morgan
Wizard
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 4,041
Karma: 4080089
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Aura, Kobo Aura One, XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Thank you very much, I've applied the patch to my FW 3.11 and it works nicely.
Terisa de morgan is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding new dictionaries to kobo. Robik Kobo Developer's Corner 14 02-11-2017 01:55 PM
Kobo dictionaries without books ? Rojofo Kobo Reader 2 04-21-2015 04:57 PM
Free (nook/Kindle/Kobo/iTunes UK) Pushing the Limits [YA Social Issues COA w/Romance] ATDrake Deals, Freebies, and Resources (No Self-Promotion) 0 12-04-2014 02:29 PM
Update kobo's dictionaries akorx Kobo Reader 3 09-28-2014 09:12 AM
Kobo desktop loading dictionaries brudigia Kobo Reader 1 07-16-2014 12:55 PM


All times are GMT -4. The time now is 08:30 PM.


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