Quote:
Originally Posted by nem_mil
Right, but the dictionaries for two alphabets are already in two distinct files, recognized by Calibre as two separate languages. I got them here: https://devbase.net/dict-sr/
So, the Latin one is tagged as "Serbo-Croatian" (the file is titled hyph_sh.dic), and I run the Latin book only through that dictionary, never through the other one. The Cyrillic one is hyph_sr and I use it only for the Cyrillic books, but it doesn't work. From what I understand, Serbo-Croatian and Serbian are seen by Calibre and Hyphenate This as two separate languages, which would mean that I never use one dictionary for two alphabets, right?
Here is how it looks on my Calibre: https://ibb.co/BCmCBR4
Why do you say that it doesn't work properly?
|
Sorry, I didn't pay sufficient attention while reading your previous comment. I wrongly interpreted and misunderstood that you've edited the dictionary file (to switch it from representing "serbo-croatian" to "serbian latin") not the ebooks language metadata.
Anyways, I just did couple of test in Calibre and I've figured out what is the problem:
this plugin doesn't like the character encoding used on that "hyph_sr.dic" (for Serbian Cyrillic). Converting the encoding to UTF-8 (
that gets you the exact same file as the one attached by @BeckyEbook) fixes the problem.
While testing things I've realised that Calibre's built-in "Add soft hyphens" option in "Polish books" tool / plugin actually uses the same file that you've downloaded (with the same character encoding) and hyphenation works correctly when using "Polish books" option.
Long story short: download and use (add to HyphenateThis plugin) the file attached by @BeckyEbook and it will work correctly for Serbian Cyrillic books.:
fixed Serbian Cyrillic hyphenation dictionary
What I've written previously still stands: you can't "install" at the same time two hyphenation dictionaries if
both get imported as "serbian". That issues was known to me every since this HyphenateThis plugin has first appeared.
You've gotten around it by changing book's language metadata to "Serbo-Croatian" and using dictionary for that. IMHO that workaround (mangling each Serbia Latin book's language metadata) is not acceptable. If I read serbian language books I would probably prefer continuously installing the correct serbian hyphenation dictionary .. or even using Calibre's "Polish Books" tool since that seams to be able to figure out when to use which of the two hyphenation dictionaries.
Hyphenation dictionaries that Polish Books uses can be found at:
Code:
C:\Program Files\Calibre2\app\resources\hyphenation\dictionaries.tar.xz