Skip to content

Junhyeok99/SimpleTranslate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Translator

Simple Translate Server with Google Translate API

  1. Download Directory
go get github.com/Junhyeok99/SimpleTranslate

Make sure you set $GOPATH

  1. Download Dependancy
cd $GOPATH/src/github.com/Junhyeok99/SimpleTranslate && make

This command will download Related Packages

  1. 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
  1. Run Program
go run main.go -flags

Description of flags are below

  1. -f

Bool type:

true: get text source from file/ false: get text source from argument

  1. -l

String type:

Location of file (default "example.txt")

  1. -lang

String type:

Destination language to Translate text (default "ko")

https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes (639-1)

  1. -t

String type:

Text which you want to Translate

Still in Develop!