RO
romantomjak/translate
Command line tool for Google's Cloud Translation API
translate

Command line client for Google's Cloud Translation API
Requirements
You'll need to sign up for Cloud Translation to get your API Key.
Install
go get -u github.com/romantomjak/translateUsage
To translate with automatic source language detection:
$ export TRANSLATE_KEY=xxx
$ export TRANSLATE_TO=en
$ translate kuģis
shipif that doesn't work, you can specify source language manually:
$ translate -from lv kuģis
shipYou can, of course, explicitly override environment values via arguments:
$ translate -key yyy -to fr kuģis
navireTranslating whole sentences
By default each space separated argument is treated as a word and will get translated on its own line like so:
$ translate mans kuģis ir visskaistākais
my
ship
and
the most beautifulTo translate whole sentences, wrap it in quotes like so:
$ translate "mans kuģis ir visskaistākais"
my ship is the most beautifulContributing
You can contribute in many ways and not just by changing the code! If you have
any ideas, just open an issue and tell me what you think.
Contributing code-wise - please fork the repository and submit a pull request.
License
MIT
On this page
Languages
Go95.5%Makefile4.5%
Contributors
Latest Release
v1.0.0August 11, 2019MIT License
Created February 19, 2019
Updated March 1, 2022