02-18-2016, 01:25 AM | #1 |
Junior Member
Posts: 6
Karma: 10
Join Date: Feb 2016
Device: Kindle PW3
|
Change Wikipedia Language
Hello.
I was wondering if is possible to change the lenguage of the wikipedia search. Instead of searching in wikipedia in English I want to search in Spanish. Also I'm looking for Dictionaries in an appropriate format to KOReader. Thanks in advance |
02-18-2016, 10:14 AM | #2 | |
Wizard
Posts: 4,465
Karma: 6900052
Join Date: Dec 2009
Location: The Heart of Texas
Device: Boox Note2, AuraHD, PDA,
|
Quote:
If you look at "/koreader/frontend/ui/Wikipedia.lua" there is a provision for changing the variable that defines the language. I don't know how that works, but you could change the "default_lang = "en" to "es". KOReader uses Stardict files. There are a number of them on the internet, including translation dictionaries. Luck; Ken |
|
Advert | |
|
02-18-2016, 06:16 PM | #3 | |
Junior Member
Posts: 6
Karma: 10
Join Date: Feb 2016
Device: Kindle PW3
|
Here is the wikipedia.lua file with default values:
Quote:
default_lang="es" //instead of "en" wiki_server="https://es.wikipedia.org" //instead of "https://%s.wikipedia.org" (I don't know what means "%", it doesn´t look like a joker char) And it doesn´t work, it keep giving me english text as answers. May be i'm losing some variable |
|
02-19-2016, 08:04 AM | #4 |
Evangelist
Posts: 445
Karma: 1084584
Join Date: Aug 2007
Location: Sisak, Croatia
Device: Kobo Aura H2O, Kobo Aura ONE
|
Try to change only default_lang="es", leave wiki_server alone.
%s means that some variable is in question. Probably the default language one. On the other hand, why hardcoding language (es) instead using variable doesn't work, I can't tell. |
02-21-2016, 01:31 AM | #5 |
Junior Member
Posts: 6
Karma: 10
Join Date: Feb 2016
Device: Kindle PW3
|
Thanks for answering. It doesn't work.
|
Advert | |
|
02-21-2016, 08:42 AM | #6 |
Evangelist
Posts: 445
Karma: 1084584
Join Date: Aug 2007
Location: Sisak, Croatia
Device: Kobo Aura H2O, Kobo Aura ONE
|
It would be good idea if you report it in koreaders github page, i.e.: https://github.com/koreader/koreader/issues In this way authors would know about this issue and can address it.
|
02-22-2016, 07:59 AM | #7 |
Wizard
Posts: 1,668
Karma: 730583
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
The %s is used a little further down with string.format:
string.format(self.wiki_server, lang or self.default_lang) The lang variable is set in frontend/ui/translator.lua, although given that we're dealing with single words I don't know about the viability of that approach. Anyway, did you try the Wikipedia API without bothering with the KOReader code? |
02-24-2016, 03:20 PM | #8 |
Junior Member
Posts: 6
Karma: 10
Join Date: Feb 2016
Device: Kindle PW3
|
What i want is searching directly in spanish wikipedia no a traduction
|
02-26-2016, 03:31 AM | #9 |
Wizard
Posts: 1,668
Karma: 730583
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
As far as I've been able to ascertain, what you did (i.e. change the variable %s to es) should already work.
|
03-04-2016, 11:07 AM | #10 | ||
Member
Posts: 14
Karma: 116
Join Date: Feb 2016
Device: Kobo Glo HD
|
Quote:
Quote:
Regards. Last edited by djalma; 03-04-2016 at 11:18 AM. |
||
Tags |
dictionaries, lenguage, wikipedia |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre language change? | mago55 | Calibre | 8 | 11-16-2020 01:49 AM |
Language change issue | Shivam | Sony Reader Dev Corner | 1 | 12-26-2012 04:34 PM |
Spellingreforms and language change | owly | General Discussions | 52 | 12-20-2012 03:33 AM |
Change Language in DR800SG | roatto | iRex | 31 | 04-14-2010 08:10 AM |
How Do I Change the Language? | PBee | Bookeen | 8 | 03-13-2009 04:56 AM |