Skip to main content

Adding a new interface language to ONLYOFFICE Docs on Linux

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:

Checking translated files​

Install ONLYOFFICE Docs on your own computer. The instructions on how this can be done are available for Ubuntu and derivatives and 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.

On Linux, documentserver is the /var/www/onlyoffice/documentserver folder.

After that open any document adding the ?lang=your_lang_code as the parameter to the document link.

note

To open the editors with the Bulgarian language interface, you will need to set this parameter as follows:

?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 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:

  1. Run the following script to clear cache:

    sudo documentserver-flush-cache.sh
    note

    In 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.