npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

deeplx

v0.1.2

Published

An unofficial Node package to translate text using [DeepL](https://www.deepl.com).

Downloads

76

Readme

DeepL Translate

GitHub Actions Codecov Codacy Grade type-coverage npm GitHub Release

Conventional Commits Renovate enabled JavaScript Style Guide Code Style: Prettier changesets

An unofficial Node package to translate text using DeepL.

Online Service

https://deeplx.vercel.app/translate

Installation

# npm
npm i deeplx

# pnpm
pnpm add deeplx

# yarn
yarn add deeplx

Usage

Supported languages

Currently the following languages are supported:

| Abbreviation | Language | Writing in own language | | ------------ | ---------- | ----------------------- | | BG | Bulgarian | Български | | ZH | Chinese | 中文 | | CS | Czech | Česky | | DA | Danish | Dansk | | NL | Dutch | Nederlands | | EN | English | English | | ET | Estonian | Eesti | | FI | Finnish | Suomi | | FR | French | Français | | DE | German | Deutsch | | EL | Greek | Ελληνικά | | HU | Hungarian | Magyar | | IT | Italian | Italiano | | JA | Japanese | 日本語 | | LV | Latvian | Latviešu | | LT | Lithuanian | Lietuvių | | PL | Polish | Polski | | PT | Portuguese | Português | | RO | Romanian | Română | | RU | Russian | Русский | | SK | Slovak | Slovenčina | | SL | Slovenian | Slovenščina | | ES | Spanish | Español | | SV | Swedish | Svenska |

You can either input the abbreviation or the language written in english.

Command line tool

Help

deeplx --help
Usage: deeplx [options]

An unofficial Node package to translate text using [DeepL](https://www.deeplx.com).

Options:
  -V, --version                  output the version number
  -sl, --source-language <text>  Source language of your text
  -tl, --target-language <text>  Target language of your desired text
  --formal                       Use formal or informal tone in translation (default: false)
  -t, --text                     Text to be translated
  -f, --file                     File to be translated
  -h, --help                     display help for command

Example 1

This will translate a Spanish (ES) text into Russian (RU):

deeplx -tl russian -t "¡Buenos días!"
Доброе утро!

Example 2

This will translate the file (test.txt) text from Italian (IT) into Portuguese (PT):

deeplx -tl PT -f test.txt

Example 3

This will translate a Spanish (ES) text into Russian (RU) in formal tone:

deeplx -tl RU --text "¿Cómo te llamas?" --formal
Как Вас зовут?

Note: informal would be "Как тебя зовут?"

Example 4

This will translate a Japanese (JP) text into German (DE) in informal tone:

deeplx -tl DE --text "お元気ですか?" --formal false
Wie geht es dir?

Note: formal would be "Wie geht es Ihnen?"

Node library

Example 1

This will translate a Chinese (ZH) text into Dutch (NL):

import { translate } from 'deeplx'

translate('你好', 'NL')
'Hallo'

Example 2

This will translate a danish text into german in informal tone:

import { translate } from 'deeplx'

translate('Ring til mig!', 'german', 'danish', undefined, undefined, false)
'Ruf mich an!'