Git Product home page Git Product logo

editor-anywhere's Introduction

Crowdin Editor Anywhere

GitHub release (latest by date) jsDelivr hits (GitHub) jsDelivr hits (GitHub) GitHub

Plugin to any website that allows to search selected text in the Crowdin project and translate it in-place

Usage

When enabled, your website users can select any text on the page, and click Search button. Then, Crowdin Editor opens in the popup, and user can translate strings found in connected Crowdin project, or review translations.

Init

Add <script src="https://cdn.jsdelivr.net/gh/crowdin/editor-anywhere@latest/editorAnywhere.js"></script> to your site.

Generate URLs to Crowdin Editor on your side with appropriate languages to translate.

Set this URL as parameter.

Tip: Provide URL to the language that matches your website current language

editorAnywhere.url = '{{url}}';

Always run init method

editorAnywhere.init(function() {
    // custom callback
});

If translation mode was already turned on before page reloading, it will initialize the plugin.

Turn On

Create a toggle button on your side.

When user enables translation mode, use method turnOn

editorAnywhere.turnOn(function() {
    // custom callback
});

Plugin will remain enabled even when page reloads.

Turn Off

Create a toggle button on your side.

When user disables translation mode, use method turnOff

editorAnywhere.turnOff(function() {
    // custom callback
});

Page will reload.

Check Status

Use isEnabled method.

var isEnabled = editorAnywhere.isEnabled();

It can be useful if there is one button to toggle translation mode.

Contribution

We are happy to accept contributions to the Crowdin Editor Anywhere. To contribute please do the following:

  1. Fork the repository on GitHub.
  2. Decide which code you want to submit. Commit your changes and push to the new branch.
  3. Ensure that your code adheres to standard conventions, as used in the rest of the library.
  4. Submit a pull request with your patch on Github.

Seeking Assistance

If you find any problems or would like to suggest a feature, please feel free to file an issue on Github at Issues Page.

Need help working with Crowdin Editor Anywhere or have any questions? Contact Customer Success Service.

License

The Crowdin Editor Anywhere is licensed under the MIT License.
See the LICENSE file distributed with this work for additional
information regarding copyright ownership.

Except as contained in the LICENSE file, the name(s) of the above copyright
holders shall not be used in advertising or otherwise to promote the sale,
use or other dealings in this Software without prior written authorization.

editor-anywhere's People

Contributors

andrii-bodnar avatar anton-yurkiv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.