View Single Post
Old 05-05-2016, 04:26 PM   #1
surquizu
Evangelist
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: 410
Karma: 902071
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.

Updated post to work with fw v.4.18.13737

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

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

1a.- Patch the libnickel.so.1.0.0 file with the method Metazoa patchs (https://www.mobileread.com/forums/sh...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>


Or,

1b.-Patch the libnickel.so.1.0.0 file with the method kobopatch (https://www.mobileread.com/forums/showthread.php?t=312598)
Edit the file libnickel.so.1.0.0.yalm and activate the patch "Allow searches on Extra dictionaries"

Spoiler:
Allow searches on Extra dictionaries:
- Enabled: 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.
- FindBaseAddressString: "\0Extra:\x20"
- ReplaceString: {Offset: 7, Find: "\x20", Replace: "_"}


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, which MUST INCLUDE NECESSARILY Extra: _XX, but after that part, YOU CAN ADD A SPACE AND THE NAME OF THE DICTIONARY TO IDENTIFY IT. That name will appear in the drop-down list of dictionaries when searching for the meaning of a word, although not in the meaning box, where it only appears as Extra_XX.
- 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

Extra:_s1 Español (DRAE)
Extra:_e1 Inglés (WordNet)
Extra:_e2 Inglés - Español (Harrap's)
Extra:_ca Català
Extra:_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:	909
Size:	15.1 KB
ID:	148459   Click image for larger version

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

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

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

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

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

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

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

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

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

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

Last edited by surquizu; 11-05-2019 at 02:24 PM. Reason: test para v.4.18.13737
surquizu is offline   Reply With Quote