- 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 your language may not be in the list of available ones. If that is the case, 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 in the next 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 your preferred tools. 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
JSONfiles for each of the supported languages. 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.
Note that the ONLYOFFICE Docs files and folders are located inside the Docker container.
After that open any document adding the ?lang=your_lang_code as the parameter to the document link.
?lang=bg
If everything is configured correctly, 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:
-
Run the following script to clear cache:
documentserver-flush-cache.shIn older versions, ONLYOFFICE Docs required editing nginx manually. Currently, all the steps are made automatically via the script above.
After that, the cache should be reset for all the server users and the interface translations will be updated.