- 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
dictionaries
folder.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_directory
For Windows:
Make sure that all the required services have access to the files. -
Move or create one of each in the directory:
- a
.dic
file (your_locale.dic) - a list of all the words in this dictionary. - an
.aff
file (your_locale.aff) - rules for affixes. - a
.json
file (your_locale.json) - a configuration file.
If you want to have a hyphenated dictionary, add a
The files should contain ahyph_your_locale.dic
file with the same locale name as your main dictionary (e.g.,hyph_fr_CA.dic
for thefr_CA
dictionary). Make sure to use the same name as the common dictionary.codes
field 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
server
directory to update and process the dictionaries:update.py
For Linux:
/var/www/onlyoffice/documentserver/server/dictionaries/update.py
For 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.