Get Started
Plugins
Macros
More information

Translator

Description

Connects the Google Translate API for translating the selected text into other languages.

Plugin type: visual, non-system.

Supported editors: documents, spreadsheets, presentations.

Analogues: Apertium, DeepL.

Translator
Installation

Available by default in the cloud, on-premises and desktop versions of ONLYOFFICE editors.

You can remove it following the desktop, on-premises, or cloud installation instructions.

The plugin guid: {7327FC95-16DA-41D9-9AF2-0E7F449F6800}.

Usage
  1. Select the text you want to translate.
  2. Open the Plugins tab and press Translator.
  3. Select the necessary language. The translation will be displayed in the plugin window immediately.
Plugin structure

Repository on GitHub: https://github.com/ONLYOFFICE/plugin-translator.

  1. config.json, index.html and code.js
  2. Icons
  3. The translations folder contains translations into Russian, German, Spanish and French.
  4. Third-party services:
    • jQuery - a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development (https://jquery.com). License: MIT License.
    • Select2 gives you a customizable select box with support for searching, tagging, remote data sets, infinite scrolling, and many other highly used options (https://select2.org/). License: MIT.
    • Google Translate API enables translation between languages. License: MIT License.
Config
{
    "name": "Translator",
    "nameLocale": {
        "ru": "Переводчик",
        "fr": "Traducteur",
        "es": "Traductor",
        "de": "Übersetzer"
    },
    "guid": "asc.{7327FC95-16DA-41D9-9AF2-0E7F449F6800}",
    "version": "1.0",

    "variations": [
        {
            "description": "Translator",
            "descriptionLocale": {
                "ru": "Переводчик",
                "fr": "Traducteur",
                "es": "Traductor",
                "de": "Übersetzer"
            },
            "url": "index.html",

            "icons": [ "resources/img/icon.png", "resources/img/icon@2x.png" ],
            "icons2": [
                {
                    "100%": { "normal": "resources/img/icon.png" },
                    "125%": { "normal": "resources/img/icon@1.25x.png" },
                    "150%": { "normal": "resources/img/icon@1.5x.png" },
                    "175%": { "normal": "resources/img/icon@1.75x.png" },
                    "200%": { "normal": "resources/img/icon@2x.png" }
                }
            ],
            "isViewer": true,
            "EditorsSupport": [ "word", "cell", "slide" ],

            "isVisual": true,
            "isModal": false,
            "isInsideMode": true,

            "initDataType": "text",
            "initData": "",

            "buttons": [],

            "initOnSelectionChanged": true
        }
    ]
}
Methods and events
Support

If you want to request a feature or report a bug regarding this plugin, use the issues section on GitHub.