| 
			
			 | 
		#1 | 
| 
			
			
			
			 Connoisseur 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73 
				Karma: 7130 
				Join Date: Apr 2015 
				
				
				
				Device: PRS-T3 
				
				
				 | 
	
	
	
		
		
			
			 
				
				Using more than one dictionary at the same time
			 
			
			
			As far as I understand the dictionary handling of Sigil, it is possible to install dictionaries for several languages, but only one of them is used for checking an ebook. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Since I have have several ebooks that include passages in several languages, it would be helpful if the spell checking and highlighting of incorrect words in the editor would be able to switch languages within the text using, for instance, the lang-tag. Regards, McDummy  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 null operator (he/him) 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,018 
				Karma: 30277294 
				Join Date: Mar 2012 
				Location: Sydney Australia 
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			The calibre editor has support for spell checking multi-lingual text. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Someone (not Kevin or Doug), attempted add multi-lingual spell checking to Sigil but it never saw the light of day. I spell check in the calibre-editor, but do other editing in Sigil. BR  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 900 
				Karma: 3501166 
				Join Date: Jan 2017 
				Location: Poland 
				
				
				Device: Various 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Archival RoadMap: https://code.google.com/archive/p/si...s/RoadMap.wiki 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Issue: https://github.com/Sigil-Ebook/Sigil/issues/218 This is not a trivial task. Patience is a virtue.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Sigil Developer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,072 
				Karma: 6361556 
				Join Date: Nov 2009 
				
				
				
				Device: many 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			The issue is *not* doing a final spellcheck in multiple languages if the xml:lang or lang attribute is properly used using a dedicated spellcheck dialog.  That is doable. 
		
	
		
		
		
		
		
		
		
		
		
		
		
			The issue is showing on the fly spelling mistakes (with red squiggly underlines) as you are editing the code itself in CodeView. The existence of potentially incomplete or broken code and the need to walk the tree back up the parent path to determine the language on the fly makes things hard to determine what language to check the just completed word in (and do it quickly). If people could just live with looking up the word on the fly in *all* used languages during editing in CV but when using the Spell Check dialog, being able to choose the specific language to spellcheck in, that would greatly simplify things. Last edited by KevinH; 06-26-2020 at 11:10 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 null operator (he/him) 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,018 
				Karma: 30277294 
				Join Date: Mar 2012 
				Location: Sydney Australia 
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Kevin, I'd prefer to only have red squiggly's under the primary language errors, and a sortable language column in spell checker. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	A spell checker bonus would be a list selector of languages found in the book (default would be 'All') so that I could focus on a particular language. BR  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#6 | 
| 
			
			
			
			 Bibliophagist 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 48,165 
				Karma: 174315444 
				Join Date: Jul 2010 
				Location: Vancouver 
				
				
				Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			And if there was some way to force the authors to wrap foreign language bits properly so Sigil wouldn't be guessing what dictionary to use.  Is it that hard to wrap your foreign language quotes in <span lang="fr">À chacun son goût</span> or <span class="el">Ημετέρα φύσις αι καθ' έξιν πράξεις εστί. Αριστεία ουν έξις (εστί)</span>?
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 null operator (he/him) 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,018 
				Karma: 30277294 
				Join Date: Mar 2012 
				Location: Sydney Australia 
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			I wouldn't expect Sigil to guess the language if its not marked up, but if it could, quelle surprise, it should be an settable option  
		
	
		
		
		
		
		
		
		
		
		
		
		
			![]() BR Last edited by BetterRed; 06-26-2020 at 10:50 PM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#8 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,763 
				Karma: 24088559 
				Join Date: Dec 2010 
				
				
				
				Device: Kindle PW2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 It works like the EPUBCheck validation plugin. I.e., it'll display potential spelling errors in the validation window. (It won't add red wavy lines!) If you're interested in testing it, PM me, and I'll send you a download link.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#9 | 
| 
			
			
			
			 null operator (he/him) 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,018 
				Karma: 30277294 
				Join Date: Mar 2012 
				Location: Sydney Australia 
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			@Doitsu - so what happened to varlog's work.  I did a little bit of testing for him, but I lost track - might have been when my old Linux laptop bit the dust. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	BR  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#10 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,763 
				Karma: 24088559 
				Join Date: Dec 2010 
				
				
				
				Device: Kindle PW2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Since the code is still available in the mlspell branch of the Sigil Github repository, maybe another developer will give it another try in the future.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#11 | 
| 
			
			
			
			 Sigil Developer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,072 
				Karma: 6361556 
				Join Date: Nov 2009 
				
				
				
				Device: many 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			FWIW, This will be my next project sometime after our next release.  But real time during editing (ie. red squiggly) will be either all languages or main language limited.  I am thinking, the main spellcheck dialogue will be the same as now but with a filter by language pull down added. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Something along those lines ...  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#12 | |
| 
			
			
			
			 Connoisseur 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73 
				Karma: 7130 
				Join Date: Apr 2015 
				
				
				
				Device: PRS-T3 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 For instance, assume that a word (e.g., "word-example") is spelled correctly in the second language, but not in the first language, and appears in the following manner: <p lang="lang1">... <span lang="lang2">word-example</span> ... word-example ... </p> When a simple search is applied which only uses "word-example" as search item to jump to the incorrectly spelled word, this search algorithm would also jump to the <span lang="lang"> instance, in which it is correctly spelled.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#13 | 
| 
			
			
			
			 Sigil Developer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,072 
				Karma: 6361556 
				Join Date: Nov 2009 
				
				
				
				Device: many 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Yes, it should be rare that the same word would appear in two-different languages side by side. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	What most people do not recognize is that once parsed, the text sits at the end of the node chain and so search must be used. Character offsets to specify a file position are simply messed up as soon as a replacement or change is performed. Even a epub3 cfi needs and uses search/pattern matching to identify text segments.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#14 | |
| 
			
			
			
			 Connoisseur 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73 
				Karma: 7130 
				Join Date: Apr 2015 
				
				
				
				Device: PRS-T3 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 <p lang="lang1">... word-example ...</p> ... <p lang="lang1">... <span lang="lang2">word-example</span> ...</p> I've read many ebooks that are written in a first language, but contain terms or citations from other languages. If the creator of the ebook does not mark all instances of a word in the proper language, you end up with this situation. Since my ebook reader applies hyphenation, reading the text gets quite annyoing, if words are not assigned to their proper language.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#15 | |
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306 
				Karma: 13057279 
				Join Date: Jul 2012 
				
				
				
				Device: Kobo Forma, Nook 
				
				
				 | 
	
	
	
		
		
		
		
		 Overlaps definitely occur more often than expected. Latest example I've been using is: "die" (German) = "the" (English) "die" (English) = "sterben" (German) It also has enormous overlap when mixing en-US (American) + en-GB (British) within the same book. (One of the latest books I converted was collection of 20 articles, about half and half.) Quote: 
	
 And which ereader are you using that applies proper hyphenation? Does it work at the per-word level too? Or only works on a per-book's-language level?  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
            
| Thread Tools | Search this Thread | 
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Search in 2 dictionary in a same time | akorx | Kobo Reader | 3 | 03-06-2020 10:30 AM | 
| Bug in dictionary function, wish: upgrade to using multiple dictionaries at one time | Bjarne | Calibre | 1 | 04-21-2019 06:13 AM | 
| So I tried to use the dictionary on my PB360 for the first time... | maxbookworm | PocketBook | 18 | 06-27-2010 09:29 PM | 
| Dictionary lookup time | tompe | Bookeen | 17 | 11-08-2008 01:19 PM |