Giter Site home page Giter Site logo

txl.el's Introduction

TXL – High-quality machine translation in Emacs via DeepL’s REST API

TXL provides machine translation through DeepL’s REST API. Note that this package is in early stages and the user interface may change.

Installation

TXL is not yet available on MELPA or similar repositories. The file txl.el must therefore be downloaded and installed manually in a directory where Emacs will find it.

If you’re using straight.el as your package manager you can install txl using:

(straight-use-package
 '(txl :type git :host github :repo "tmalsburg/txl.el"))

Dependencies are:

Configuration

Minimally the user needs to specify a pair of languages in the customization variable txl-languages and an authentication key for DeepL’s REST API via txl-deepl-api-url. (You need the “developer” subscription.) Example:

(require 'txl)
(setq txl-languages '(DE . EN-US))
(setq txl-deepl-api-key "my-api-key")

Other configuration variables are txl-deelp-split-sentences, txl-deepl-preserve-formatting, and txl-deepl-formality. See inline documentation for details.

For convenience the translation command can be bound to a keyboard shortcut. Example:

(global-set-key (kbd "C-x t")   'txl-translate-region-or-paragraph)

Usage

The command txl-translate-region-or-paragraph translates the marked region or, if no region is active, the paragraph to the respective other language. The current language is detected using the guess-language package. The retrieved translation is shown in a separate buffer where it can be reviewed and edited. The original text can be replaced with the (edited) translation via C-c C-c. The translation can be dismissed (without touching the original text) using C-c C-k. If a prefix argument is given (C-u), the text will be translated round-trip to the other language and back.

txl.el's People

Contributors

tmalsburg avatar rtrppl 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.