All Projects → TimLuo465 → baidu-translate-api

TimLuo465 / baidu-translate-api

Licence: MIT License
A free and unlimited API for Baidu Translate

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to baidu-translate-api

Translators
🌏🌍🌎Translators🌎🌍🌏 is a library which aims to bring free, multiple, enjoyable translation to individuals and students in Python. Translators是一个旨在用Python为个人和学生带来免费、多样、愉快翻译的库。
Stars: ✭ 295 (+570.45%)
Mutual labels:  translate, baidu
Alfred Parrot
📝 一款可以多种语言翻译的 Alfred Workflow
Stars: ✭ 89 (+102.27%)
Mutual labels:  translate, baidu
Chrome Extension Udemy Translate
Translate Udemy's subtitles into Chinese、English etc(Disneyplus+netflix+udemy+lynda+hulu+hbo now+primevideo)
Stars: ✭ 553 (+1156.82%)
Mutual labels:  translate, baidu
terminal-translate
a terminal-translate tool
Stars: ✭ 73 (+65.91%)
Mutual labels:  translate, baidu
Mtrans
Multi-source Translation
Stars: ✭ 711 (+1515.91%)
Mutual labels:  translate, baidu
the-subway-of-china
中国地铁图
Stars: ✭ 104 (+136.36%)
Mutual labels:  translate, baidu
luna-fans-api
luna cloud tools
Stars: ✭ 226 (+413.64%)
Mutual labels:  baidu
baidutongji
百度统计API- python版
Stars: ✭ 13 (-70.45%)
Mutual labels:  baidu
deepspeech.mxnet
A MXNet implementation of Baidu's DeepSpeech architecture
Stars: ✭ 82 (+86.36%)
Mutual labels:  baidu
vue-translated
Internationalization (i18n) and localization (l10n) library for Vue.js v2.
Stars: ✭ 19 (-56.82%)
Mutual labels:  translate
Cpp-Translate
A c++ project for translating c++ in many languages (including std) (it is a joke)
Stars: ✭ 38 (-13.64%)
Mutual labels:  translate
pygtrans
谷歌翻译, 支持 APIKEY 一口气翻译十万条
Stars: ✭ 60 (+36.36%)
Mutual labels:  translate
mongoose-slug-plugin
Slugs for Mongoose with history and i18n support (uses speakingurl by default, but you can use any slug library such as limax, slugify, mollusc, or slugme)
Stars: ✭ 21 (-52.27%)
Mutual labels:  translate
web-translate
支持pdf和web的双击划词翻译脚本,当前使用爱词霸公共api
Stars: ✭ 43 (-2.27%)
Mutual labels:  translate
tr4n5l4te
Use Google Translate without an API key.
Stars: ✭ 32 (-27.27%)
Mutual labels:  translate
BaiduDiskSearcher
百度网盘搜索工具(.NET4.0 & Visual Studio 2017)
Stars: ✭ 43 (-2.27%)
Mutual labels:  baidu
ldr-translate
一个linux/ubuntu版本的翻译软件,主打文献翻译(a translate app for ubuntu/linux),使用Gtk3开发,python语言;国内看这里:https://gitee.com/yuhldr/ldr-translate
Stars: ✭ 30 (-31.82%)
Mutual labels:  translate
translate-components
🌎🌍🌏 translate-components provides a super simple translation for React.
Stars: ✭ 16 (-63.64%)
Mutual labels:  translate
lcg-php
百度 莱茨狗 php 抓取,提交,增加99%识别率API
Stars: ✭ 11 (-75%)
Mutual labels:  baidu
google-CommandLine-Translation-Tool
命令行翻译工具-谷歌-中英文
Stars: ✭ 22 (-50%)
Mutual labels:  translate

baidu-translate-api npm

A free and unlimited API for Baidu Translate

Translations

Install

npm install --save baidu-translate-api 

or

yarn add baidu-translate-api

Usage

const translate = require("baidu-translate-api");

translate("让我们来翻译吧!").then(res => {
    console.log(res.trans_result.dst);
    // Let's translate it!
});

API

translate(query, options)

query

Type: String

The text to be translated

options

Type: Object

  • from

    Type: String Default: auto

    The language in which the query text or auto. Contain in Languages

  • to

    Type: String Default: en

    The language in which the text should be translated. Contain in Languages

  • requestOpts

    Type: RequestOptions Default: {}

    reference request options

Returns an object:

  • from - The lanuage in which the query text.

  • to

  • trans_result (object)

    • dst - The translation
    • src - The source (equal to query)

setGlobalConfig(config)

name desc
useLocalStore store the token config in memory. default: false.

Languages

abbr name
auto Automatic detection
zh Chinese
en English
yue Cantonese
wyw Classical Chinese
jp Japanese
kor Korean
fra French
spa Spanish
th Thai
ara Arabic
ru Russian
pt Portuguese
de German
it Italian
el Greek language
nl Dutch
pl Polish
bul Bulgarian
est Estonian
dan Danish
fin Finnish
cs Czech
rom Romanian
slo Slovenia
swe Swedish
hu Hungarian
cht Traditional Chinese
vie Vietnamese

AFTERWORD

If this repo helped you, give me a star and it's the greatest encouragement to me.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].