Is it possible to add new hyphenation rules to InDesign, and what languages does it have built-in hyphenation for?
-
I assume by “in what language does it hyphenate usually” you’re asking what languages InDesign has built-in hyphenation for, correct? There’s no “usually”—it always hyphenates according to the language specified in the paragraph style applied to the text in question. (Not sure what it does in the rare case that you get text with no paragraph style applied at all—probably just no hyphenation, I would guess.)– Janus Bahs JacquetOct 24, 2017 at 0:34
-
Yes that is what I meant. Do you know if it's possible to modify it's hyphenation rules, or add a new language ?– alfredOct 24, 2017 at 1:04
-
I found Edit/Spelling/User Dictionary that allows you to add new hyphenated words. But what would you do if your language is not listed.– alfredOct 24, 2017 at 12:44
-
Which language are you talking about?– Janus Bahs JacquetOct 24, 2017 at 13:05
-
Albanian, it is no listed and I'm trying to find out if there is a way to add it, what would be the syntax etc ..– alfredOct 24, 2017 at 13:07
1 Answer
It is possible both to add new hyphenation rules to existing language dictionaries in InDesign and to add new language dictionaries.
Adding a language (Albanian)
The exact steps you have to take to add a dictionary for a new language vary according to your OS (operating system) and which version of InDesign you’re using. There is a very clear and extensive guide on Adobe’s help pages, which will help you.
There aren’t many Albanian Hunspell dictionaries available, but there is one on GitHub, based on the older Shkenca dictionaries. Note that these are not made by a corporative entity, but seemingly by a single person, so they may contain unspotted errors.
To install Albanian:
- download the
.aff
and.dic
files from the GitHub page - rename them to
sq_AL.aff
andsq_AL.dic
respectively - create a folder named
sq_AL
in the proper location (see step 4 on the Adobe help page) and put the two files in that folder - open the file
Info.plist
in the proper location (see step 5 on the Adobe help page). Note: If you’re on a Mac, once you findAdobeHunspellPlugin.bundle
, you have to right-click and select “Show package contents” to see the subfolderContents
where the plist file is located - locate the lines in the file that say
<key>HyphenationService</key>
,<key>SpellingService</key>
and<key>UserDictionaryService</key>
. Immediately following each of those lines is a start tag<array>
, followed by a list of<string>xx_XX</string>
tags. Add a string tag<string>sq_AL</string>
to that list. It doesn’t matter where in the list you put it.
The next time you restart InDesign, you should be able to choose Albanian as one of the languages you can set text in.
Adding words
As you mention in your comment, you can add your own words in addition to the ones already present in the Hunspell dictionary by using the Edit → Spelling → User Dictionary options.
The interface there is intuitive enough, but if you need more help, there is also an Adobe help page on spell-checking and language dictionaries.
When you add a new word, you can click the Hyphenate button to suggest an automated hyphenation rule. This rule is based on the hyphenation rules set out in the Hunspell dictionary itself and will usually, but not always, be accurate. If you wish to tweak it to be absolutely how you want it, you can set the hyphenation options yourself.
Points 6 and 7 in the section Add words to dictionaries on the Adobe help page explains the syntax:
- Tildes (~) indicate possible hyphenation points.
- Type one tilde (~) to indicate the best possible hyphenation points, or the only acceptable hyphenation point, in the word.
- Type two tildes (~~) to indicate your second choice.
- Type three tildes (~~~) to indicate a poor but acceptable hyphenation point.
- If you want the word never to be hyphenated, type a tilde before its first letter.
-
Followed your answer and added the new language successfully, but as you said it contains errors (shklluq is my test word and should never be hyphenated). I would try to correct it, but I'm not sure how to edit to
sq_AL.aff
andsq_AL.dic
.. (I created from scratch the hyphenation patterns in LaTeX).– alfredOct 24, 2017 at 14:46 -
Looking more closely at the preconfigured dictionaries included in InDesign, it seems that they all consist of three dictionaries: an affix file, a spelling dictionary, and a hyphenation dictionary (
hyph_sq_AL.dic
). I can’t quite figure out how the automated hyphenation works when there is no hyphenation dictionary file, though. Oct 24, 2017 at 15:35 -
That's huge because
hyph_en_Ca.dic
has the same rules as LaTeX, I already have the patterns for that.– alfredOct 24, 2017 at 15:42 -
@alfred I hope that means you have a way of figuring it out! Oct 24, 2017 at 17:57
-
1My patterns seem to work. It's surprising how easy this was. Thank you for your help Janus.– alfredOct 24, 2017 at 21:48