All Projects → mind1949 → googletrans

mind1949 / googletrans

Licence: MIT license
G文⚡️: Concurrency-safe, Free and Unlimited google translate api for Golang. 🔥免费、无限、并发安全的谷歌翻译包

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to googletrans

php-google-translate-for-free
Library for free use Google Translator. With attempts connecting on failure and array support.
Stars: ✭ 124 (+31.91%)
Mutual labels:  translator, google-translate, detect-language
HighlightTranslator
Highlight Translator can help you to translate the words quickly and accurately. By only highlighting, copying, or screenshoting the content you want to translate anywhere on your computer (ex. PDF, PPT, WORD etc.), the translated results will then be automatically displayed before you.
Stars: ✭ 54 (-42.55%)
Mutual labels:  translator, google-translate, google-translate-api
tr4n5l4te
Use Google Translate without an API key.
Stars: ✭ 32 (-65.96%)
Mutual labels:  translator, google-translate
currency
A currency computations package.
Stars: ✭ 52 (-44.68%)
Mutual labels:  go-library, go-package
google-translate-tk
Calculate google translate's token(tk) by Golang
Stars: ✭ 33 (-64.89%)
Mutual labels:  google-translate, google-translate-api
node-google-translate-skidz
Simple Node.js library for talking to Google's Translate API for free.
Stars: ✭ 70 (-25.53%)
Mutual labels:  translator, google-translate
telegram
📚 Golang bindings for Telegram API
Stars: ✭ 15 (-84.04%)
Mutual labels:  go-library, go-package
MouseTooltipTranslator
chrome extension - When mouse hover on text, it shows translated tooltip using google translate
Stars: ✭ 93 (-1.06%)
Mutual labels:  translator, google-translate
gpytranslate
A Python3 library for translating text using Google Translate API.
Stars: ✭ 34 (-63.83%)
Mutual labels:  translator, googletrans
translate
A module grouping multiple translation APIs
Stars: ✭ 321 (+241.49%)
Mutual labels:  translator, google-translate
translation-google
A Google Translate component for Nodejs.
Stars: ✭ 42 (-55.32%)
Mutual labels:  google-translate, google-translate-api
php2python
Convert PHP code to Python under CGI (beta)
Stars: ✭ 44 (-53.19%)
Mutual labels:  translator
NMSAlphabetAndroidApp
An unofficial translator app for No Man's Sky
Stars: ✭ 22 (-76.6%)
Mutual labels:  translator
pollly
The simplest editor to translate apps & sites for YML files. Fast and Simple. Try now!
Stars: ✭ 32 (-65.96%)
Mutual labels:  translator
po-auto-translation
translate PO files automatically for FREE using google translate
Stars: ✭ 33 (-64.89%)
Mutual labels:  google-translate
react-translator-component
React language translation module for developing a multilingual project.
Stars: ✭ 13 (-86.17%)
Mutual labels:  translator
RTranslator
RTranslator is the world's first open source real-time translation app.
Stars: ✭ 59 (-37.23%)
Mutual labels:  translator
linguist
Linguist is a powerful browser extension for translate pages and text, which are ready to replace your favorite translate service
Stars: ✭ 21 (-77.66%)
Mutual labels:  translator
text2text
Text2Text: Cross-lingual natural language processing and generation toolkit
Stars: ✭ 188 (+100%)
Mutual labels:  translator
ip2proxy-go
IP2Proxy Go package allows users to query an IP address to determine if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits.
Stars: ✭ 12 (-87.23%)
Mutual labels:  go-package

Googletrans

language Documentation Go Report Card

G文⚡️: Concurrency-safe, free and unlimited golang library that implemented Google Translate API.

Inspired by py-googletrans.

Features

  • Out of the box
  • Auto language detection
  • Customizable service URL

Installation

go get -u github.com/mind1949/googletrans

Usage

Detect language

package main

import (
	"fmt"

	"github.com/mind1949/googletrans"
)

func main() {
	detected, err := googletrans.Detect("hello googletrans")
	if err != nil {
		panic(err)
	}

	format := "language: %q, confidence: %0.2f\n"
	fmt.Printf(format, detected.Lang, detected.Confidence)
}

// Output:
// language: "en", confidence: 1.00

Translate

package main

import (
	"fmt"

	"github.com/mind1949/googletrans"
	"golang.org/x/text/language"
)

func main() {
	params := googletrans.TranslateParams{
		Src:  "auto",
		Dest: language.SimplifiedChinese.String(),
		Text: "Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. ",
	}
	translated, err := googletrans.Translate(params)
	if err != nil {
		panic(err)
	}
	fmt.Printf("text: %q \npronunciation: %q", translated.Text, translated.Pronunciation)
}

// Output:
// text: "Go是一种开放源代码编程语言,可轻松构建简单,可靠且高效的软件。"
// pronunciation: "Go shì yī zhǒng kāifàng yuán dàimǎ biānchéng yǔyán, kě qīngsōng gòujiàn jiǎndān, kěkào qiě gāoxiào de ruǎnjiàn."

Customize service URLs

package main

import "github.com/mind1949/googletrans"

func main() {
	serviceURLs := []string{
		"https://translate.google.com/",
		"https://translate.google.pl/"}
	googletrans.Append(serviceURLs...)
}
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].