- Home
- Docs
- Installation and configuration
- Community
- Docker version
- Adding a new interface language to ONLYOFFICE Docs
Adding a new interface language to ONLYOFFICE Docs
Introduction
ONLYOFFICE Docs interface is available in many languages, but it might happen that your language is absent from the list of the available ones. If it is so, and you have a possibility to participate in the translation of ONLYOFFICE Docs interface into your own language, you will need to check if everything is translated correctly and all the words and phrases fit where they belong.
This article will explain how this can be done.
Participating in translation
There are two ways to take part in the translation process:
- Translate ONLYOFFICE Docs (together with ONLYOFFICE Workspace and ONLYOFFICE Mail, if needed) using our Translation system. The process is quite easy. Once the translation is over, the language files for the interface translation will be included into the nearest release. We can also send them for you to check. If you would like to participate, feel free to contact us via the documentation@onlyoffice.com email address.
- Or you can use our GitHub repository to get the language files and translate them using the means you are used to. The files are located by the following paths:
Document Editor
- https://github.com/ONLYOFFICE/web-apps/tree/master/apps/documenteditor/main/locale
- https://github.com/ONLYOFFICE/web-apps/tree/master/apps/documenteditor/mobile/locale
Presentation Editor
- https://github.com/ONLYOFFICE/web-apps/tree/master/apps/presentationeditor/main/locale
- https://github.com/ONLYOFFICE/web-apps/tree/master/apps/presentationeditor/mobile/locale
Spreadsheet Editor
- https://github.com/ONLYOFFICE/web-apps/tree/master/apps/spreadsheeteditor/main/locale
- https://github.com/ONLYOFFICE/web-apps/tree/master/apps/spreadsheeteditor/mobile/locale
There are
JSON
files for each of the supported language. You can either correct the files already there or add your own language file with the two-letter language locale code.
Checking translated files
Install ONLYOFFICE Docs on your own computer. The instruction on how this can be done is available here for Docker installation.
If you use our translation system, you will need to contact us using the documentation@onlyoffice.com email address, so that we could send you the translated files.
Once you have the interface language JSON
files, put them using the following paths:
Document Editor
- documentserver/web-apps/apps/documenteditor/main/locale
- documentserver/web-apps/apps/documenteditor/mobile/locale
Presentation Editor
- documentserver/web-apps/apps/presentationeditor/main/locale
- documentserver/web-apps/apps/presentationeditor/mobile/locale
Spreadsheet Editor
- documentserver/web-apps/apps/spreadsheeteditor/main/locale
- documentserver/web-apps/apps/spreadsheeteditor/mobile/locale
Where documentserver is the folder with the ONLYOFFICE Docs installed.
Do not forget to enter the Docker container to look for the ONLYOFFICE Docs files and folders.
After that open any document adding the ?lang=your_lang_code
as the parameter to the document link.
?lang=bg
If everything is done right, you will see the interface of the editors change to your language with your translations.
Updating translated files
After you check the translation (or after the ONLYOFFICE Docs updates) you might need to correct the files and upload them once again to the server instance. The files are cached for faster performance, and you (and other ONLYOFFICE Docs users) will not see the changes until the server cache is cleared.
This is done the following way:
- Find the
/etc/nginx/includes/ds-docservice.conf
and/etc/nginx/includes/ds-spellchecker.conf
files. -
The files must contain the build date and time values. Change these values to some other (any value will do, but the main thing that it must be the same in all the places).
Please note that you need to find and replace all the instances of the date and time values in the above files. See the samples of ds-docservice.conf and ds-spellchecker.conf files in our GitHub repository. All the instances of the
{{DATE}}
variable there correspond to the date and time values which must be replaced. - Restart NGINX:
sudo service nginx reload
After that, the cache should be reset for all the server users and the interface translations will be updated.