Double-click Translator website plugin
We are glad to announce the JavaScript library for quick translation of English text into Russian. Translation is performed with New Big English-Russian Dictionary. To see the translation please double-click on a word. Below you can see this plugin in action:
In her favor, I go naked, live in a cheap room, eat rubbish, write with pale ink. Everything, everything she eats, insatiable! I hate her, despise her... For a long time it is time to divorce her, but I'm not, I am still not because Moscow lawyers take for a divorce four thousand... children... we do not have any... Do you want to know her name? Very well... It is poetic and sounds like Lily, Lelia, Nellie... Her name is - laziiiiiiness.
A.P. Chekhov - My "she"
Translated by V. Boychenko
Adding to your website
There are two ways to include the plugin: the simple one and the advanced one (with the ability to configure)
For the simple including just put the following HTML-code into any place of your page:
<script src="https://englishprosto.com.ua/plugin/dc-translator.js" data-autoload="1"></script>
The advanced way gives you the ability to configure plugin, e.g. set translation panel width and height, choose HTML-element to translate, etc.
Example:
<script src="https://englishprosto.com.ua/plugin/dc-translator.js"></script> <script> dcTranslator.init({ node: document.getElementById('example_box'), width: 450, height: 300 }); </script>
Full list of options see below.
jQuery integration
The library also works as jQuery plugin:
<script src="https://englishprosto.com.ua/plugin/dc-translator.js"></script> <script> $('#example_box').dcTranslator({ width: 450, height: 300 }); </script>
List of options
Option | Default value | Description |
---|---|---|
node | document.body | HTML-element to translate |
width | 500 | Translation panel width |
height | 300 | Translation panel height |
headerHtml | 'Double-click Translator' | Translation panel header HTML-code |
footerHtml | 'Powered by <a href="http://englishprosto.com.ua/developer" target="_blank">English Prosto</a>' | Translation panel footer HTML-code |
loadingHtml | 'Loading, please wait...' | Translation panel loading element HTML-code |
zIndex | 10000000 | Translation panel z-index CSS-property. Set in case of the overlap by other elements |
cssFile | undefined | URL to CSS-file to be injected into translation panel iframe-element. Set if you want to change translation panel style |
Browser compatibility
The library is compatible with the following browsers: Chrome, Firefox, Opera, Safari, IE7+
Promo materials
If you like the plugin you can help us improve it by putting the link with the image to you website:
Embed code:
<a href="https://englishprosto.com.ua/developer" target="_blank" title="Дважды щелкните по слову чтобы получить перевод"><img src="https://englishprosto.com.ua/plugin/promo1.png" alt="Double-click Translator"></a>
Thank you for your time!
Feedback
If you have any questions, recommendations, suggestions, or advices, we would be happy to hear from you.