Adding a new interface language to ONLYOFFICE Docs on Linux

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:

Checking translated files

Install ONLYOFFICE Docs on your own computer. The instruction on how this can be done is available here for Ubuntu and derivatives or here for RPM-based distros.

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.

To open the editors with the Bulgarian language interface, you will need to set this parameter as follows:
?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:

All the actions must be performed within the Docker container.
  1. Find the /etc/nginx/includes/ds-docservice.conf and /etc/nginx/includes/ds-spellchecker.conf files.
  2. 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.
  3. 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.

Host ONLYOFFICE Docs on your own server or use it in the cloud

Article with the tag:
Browse all tags