Initial document for adding a spellcheck language dictionary to manuskript

Curtis Gedak 2017-12-29 12:50:21 -07:00
parent 576d4b87e7
commit 1412845b1f

@ -0,0 +1,78 @@
# Adding a Spellcheck Language Dictionary to Manuskript
The spellcheck feature of manuskript is provided by the [PyEnchant](https://pythonhosted.org/pyenchant/) package. Additional language dictionaries can be added to Manuskript to enable spell check to work with other languages.
Following are instructions to add dictionaries based on which Operating System you use.
## GNU/Linux
Identify the language code and install the dictionary package.
### Debian based (Debian, Ubuntu, Mint, etc.)
1. Search for desired language dictionary (e.g. Brazilian Portuguese)
```
apt-cache search aspell | grep -i portuguese
```
Sample output:
```
aspell-pt - Portuguese dictionaries for GNU Aspell (old package)
aspell-pt-br - Brazilian Portuguese dictionary for GNU Aspell
aspell-pt-pt - European Portuguese dictionary for GNU Aspell
```
2. Install the desired language dictionary package:
```
sudo apt install aspell-pt-br
```
### Fedora based (Fedora, CentOS, etc)
1. Search for desired language dictionary (e.g. Spanish)
```
su -c "dnf search aspell | grep -i spanish"
```
Sample output:
```
aspell-es.x86_64 : Spanish dictionaries for Aspell
```
2. Install the desired language dictionary package:
```
su -c "dnf install aspell-es"
```
## Windows
These instructions assume you are using the Windows binary package which is built using PyInstaller. The default dictionary languages installed are shown in the following screen shot:
![manuskript-windows-default-dictionaries](https://user-images.githubusercontent.com/10405019/34446110-cc639024-ec95-11e7-94b1-bb1685b7f5e6.png)
With the Windows PyInstaller package the enchant dictionary files are stored under the "`manuskript/enchant/share/enchant/myspell/`" directory. The dictionary files have a pair of names: `*.aff` and `*.dic`
1. Locate the desired language at the following link: [LibreOffice dictionaries](https://cgit.freedesktop.org/libreoffice/dictionaries/tree/).
2. Download the two files `*.aff` and `*.dic` for the desired language.
For example for Hebrew there is the [he_IL](https://cgit.freedesktop.org/libreoffice/dictionaries/tree/he_IL) directory which contains the `he_IL.aff` and `he_IL.dic` files.
3. Copy these two files to the "`manuskript/enchant/share/enchant/myspell/`" directory where you unzipped manuskript.
4. Now when you run `manuskript.exe` the Hebrew dictionaries are available under the **Tools -> Dictionary** menu.
![manuskript-windows-added-hebrew-dictionary](https://user-images.githubusercontent.com/10405019/34446122-dbd83668-ec95-11e7-996a-91f4426de026.png)
## Mac OS X
*To be filled out by someone with access to Mac OS X*.