- Home
- Docs
- Installation and configuration
- Installation and configuration
- Docker version
- Adding custom dictionaries to the server version
Adding custom dictionaries to the server version
Introduction
The server version of ONLYOFFICE Docs allows the administrators to add custom dictionaries. Refer to the following guide to learn how to add your custom dictionary.
Adding a custom dictionary
-
When you have installed ONLYOFFICE Docs on your server, open the
dictionariesfolder.For Linux:
/var/www/onlyoffice/documentserver/dictionaries/For Windows:
C:\Program Files\ONLYOFFICE\DocumentServer\dictionaries -
Create a directory for the required dictionary. The folder name must include the language locale (e.g., fr_CA, de_DE), while the dictionaries within the directory must have the same language locale names (.dic, .aff). Please note that corresponding access rights shall be assigned, e.g.:
For Linux:
chown -R ds:ds /var/www/onlyoffice/documentserver/dictionaries/your_locale_directoryFor Windows:
Make sure that all the required services have access to the files. -
Move or create one of each in the directory:
- a
.dicfile (your_locale.dic) - a list of all the words in this dictionary. - an
.afffile (your_locale.aff) - rules for affixes. - a
.jsonfile (your_locale.json) - a configuration file.
If you want to have a hyphenated dictionary, add a
The files should contain ahyph_your_locale.dicfile with the same locale name as your main dictionary (e.g.,hyph_fr_CA.dicfor thefr_CAdictionary). Make sure to use the same name as the common dictionary.codesfield and the LCID values.{ "codes": [LCID_number] }Please refer to the following example on our GitHub.
- a
-
When you have added all the required dictionaries, run the following script from the
serverdirectory to update and process the dictionaries:update.pyFor Linux:
/var/www/onlyoffice/documentserver/server/dictionaries/update.pyFor Windows:
C:\Program Files\ONLYOFFICE\DocumentServer\server\dictionaries\update.py -
Restart the ONLYOFFICE services. For Docker installation, restart the Docker container.
.gz files are created only in Docker installation.
- Clear the browser cache.