Simple Translate Server with Google Translate API
- Download Directory
go get github.com/Junhyeok99/SimpleTranslate
Make sure you set $GOPATH
- Download Dependancy
cd $GOPATH/src/github.com/Junhyeok99/SimpleTranslate && make
This command will download Related Packages
- Set your env Google API needs json key path in env variable
Fix sample_env.sh
with your Google API KEY (Go to the link below)
https://console.developers.google.com/apis
After change the value run below:
source sample_env.sh
- Run Program
go run main.go -flags
Description of flags are below
- -f
Bool type:
true: get text source from file/ false: get text source from argument
- -l
String type:
Location of file (default "example.txt")
- -lang
String type:
Destination language to Translate text (default "ko")
https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes (639-1)
- -t
String type:
Text which you want to Translate
Still in Develop!