• Jodit
  • PRO
  • Builder
  • Getting Started
  • Playground
  • Examples
  • Documentation
  • Download
  • Overview
  • Issue tracker
  • Docs
  • Plugins
  • Demo
  • Pricing
  • File Browser Pro
  • Sign in
Get connected wth us on social networks!

Footer

Jodit Core

  • Jodit Home page
  • Documentation
  • Playground
  • Examples
  • Github
  • Issues

Integration

  • Jodit React
  • Jodit Angular
  • Jodit Vue
  • Jodit Yii2
  • Jodit Joomla

PRO/OEM plugins

  • AutoComplete
  • Backup Plugin
  • Button Generator
  • Change case
  • Custom Color Picker
  • Emoji
  • Finder
  • Google Search
  • Paste code
  • Show Blocks
  • Virtual Keyboard
  • Tune block
  • Highlight signature
  • Google Maps Editor
  • Export in PDF
  • Page Break
  • Iframe Editor
  • Paste from Word PRO
  • Mobile View
  • ToDo List
  • Translate

Links

  • Demo PRO/OEM
  • Demo FileBrowser PRO
  • Price
  • License
  • Support
  • For resellers

Versions

  • site v.0.1.810
  • Jodit PRO v.4.6.4
  • Jodit v.4.6.2
  • All versions
2025 © Copyright: XDSoft.net <support@xdsoft.net>
  • Getting started

    • Installation
    • Usage
    • Support
    • FAQs
    • Cloud
    • Examples
  • How to

    • Create plugin
    • Add custom button
    • Add custom font in the font list
    • How to create module
    • How to generate license key
    • How to make a backend finder
    • How to set up document view
  • Modes

    • Source mode
  • Customisation

    • Theme
    • Keyboard
  • API

    • License Rest API
    • JS API
  • Changelog

  • Plugins

    • AutoComplete
    • Backup Plugin
    • Button Generator
    • Change case
    • Custom Color Picker
    • Emoji
    • Finder
    • Google Search
    • Paste code
    • Show Blocks
    • Virtual Keyboard
    • Tune block
    • Highlight signature
    • Google Maps Editor
    • Export in PDF
    • Page Break
    • Iframe Editor
    • Paste from Word PRO
    • Mobile View
    • ToDo List
    • Translate

Translate plugin

When you use a translate plugin, you can change the language settings on the fly right from the translate toolbar buttons. But their defaults, the translation engine and its API key need to be set in the configuration panel.

Options

translate.provider

  • Type: 'google' | ITranslateProviderFactory
  • Default: ''
  • Required: true

Translation engine. You can use any of the following:

  • google - Google Translate API
  • You can define your own translation provider that implements the interface ITranslateProviderFactory. Example

translate.defaultSourceLang

Default source language. Use a language ISO-639-1 codes. The default language is determined from the Jodit.defaultOptions.language settings.

  • Type: String
  • Default: 'auto'
  • Required: true

translate.defaultTargetLang

Default target language. Use a language ISO-639-1 codes.

  • Type: String
  • Default: 'de'
  • Required: true

translate.googleProviderOptions

  • Type: IGoogleTranslateProviderOptions
  • Default: {}
  • Required: false

Options for Google Translate API

translate.googleProviderOptions.key

  • Type: String
  • Default: ''
  • Required: true

API key for using Google Translate engine. Get API key

Custom translate provider

Use your own translation provider. You must provide a function that returns an object with a translate method that must return Promise<ITranslateResponse>

interface ITranslateResponse { text: string; }
Copy

And a method that returns a list of supported languages

interface ITranslateSupportedLanguages { langs: { [title: string]: string; }; }
Copy
import { JoditPro } from 'jodit-pro'; JoditPro.make('#editor', { language: 'en', buttons: ['translate.translate'], extraPlugins: ['translate'], translate: { provider: (jodit) => { return { supportedLanguages() { return Promise.resolve({ langs: { English: 'en', Russian: 'ru', German: 'de' } }); }, translate(text, from, to) { return fetch( 'https://your-translate-service.com/?text=' + encodeURIComponent(text) + '&from=' + encodeURIComponent(from || jodit.o.language) + '&to=' + encodeURIComponent(to) ) .then((resp) => resp.json()) .then((data) => { text: data.translation.text; }); } }; } } });
Copy

Installation

<!doctype html> <html> <head> <title>Translate Editor</title> <meta charset="utf-8" /> <!-- css --> <link rel="stylesheet" href="./node_modules/jodit-pro/build/jodit.css" /> <link rel="stylesheet" href="./node_modules/jodit-pro/build/plugins/translate/translate.css" /> </head> <body> <!-- element --> <textarea id="entry">...</textarea> <!-- js --> <script src="./node_modules/jodit-pro/build/jodit.js"></script> <script src="./node_modules/jodit-pro/build/config.js"></script> <script src="./node_modules/jodit-pro/build/plugins/translate/translate.js"></script> <!-- call --> <script> Jodit.make('#entry', { extraPlugins: ['translate'], translate: { provider: 'google', googleProviderOptions: { key: '{YOUR_GOOGLE_API_KEY}' } } }); </script> </body> </html>
Copy

Example

Use google translate provider.

import { JoditPro } from 'jodit-pro'; JoditPro.make('#editor', { language: 'en', buttons: ['translate.translate'], extraPlugins: ['translate'], translate: { provider: 'google', googleProviderOptions: { key: '{YOUR_GOOGLE_API_KEY}' } } });
Copy

Demo

A forest is an ecosystem represented by a variety of trees. Forests are deciduous, coniferous, oak and mixed species. Tundra and taiga also belong to forest varieties. The forest is called "the lungs of the planet", because it produces a huge amount of oxygen, and conifers saturate the air with vital nitrogen. But unfortunately, excessive deforestation and forest fires lead to a decrease in oxygen production, as well as to soil erosion and a reduction in the range of animals and insects.

Button

Way through the yellow forest
Photo by Patrick Fore on Unsplash

Some people think that the forest is a lot of trees and a bunch of annoying insects. But the forest is a fairy tale where you can meet many interesting and unusual things. In the forest, besides trees, a lot of shrubs and other plants grow. Forest glades are covered with many berries and mushrooms. Mushroom pickers visit the forest behind honey agarics, aspen mushrooms, boletus mushrooms, brown mushrooms, chanterelles. And those who decide to just walk through the forest will always be able to pick up a small basket of berries such as blueberries, strawberries, raspberries.