Sublime Text and Polish dictionary from OpenOffice

If you are struggling with adding spellchecker for Polish language, follow these steps

— Download dictionary —

Head to https://extensions.openoffice.org and download Polish Dictionary Pack. You will find something called pl-dict.oxt inside your ~/Downloads directory. You need to unzip this one.

> mkdir -p ~/tmp/dict
> mv ~/Downloads/pl-dict.oxt ~/tmp/dict
> cd ~/tmp/dict
> unzip pl-dict.oxt

you will find something like this inside your ~/tmp/dict directory.

.
|-- description.xml
|-- Dictionaries.xcu
|-- flaga.png
|-- hyph_pl_PL.dic
|-- META-INF
|   `-- manifest.xml
|-- pl_PL.aff
|-- pl_PL.dic
|-- pl-dict.oxt
|-- README_en.txt
|-- README_pl.txt
|-- th_pl_PL_v2.dat
`-- th_pl_PL_v2.idx

— Convert dictionary to UTF-8 —

> iconv -f ISO-8859-2 -t UTF-8 pl_PL.aff > pl_PL_utf8.aff
> iconv -f ISO-8859-2 -t UTF-8 pl_PL.dic > pl_PL_utf8.dic

— Modify encoding inside aff file —

You want to replace the first line of pl_PL_utf8.aff

SET ISO8859-2

with

SET UTF-8

— Put aff and dic inside Sublime Text —

Locate your local packages directory

Inside User directory create sub directory Language - Polish and save pl_PL_utf8.aff and pl_PL_utf8.dic inside this newly created location.

— Use Polish dictionary —

— You are a happy user now —