go-translate-cli

command module
v0.0.0-...-c48af5f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2025 License: MIT Imports: 10 Imported by: 0

README

go-translate-cli

a cli tool for translation between Chinese and English

##install:

  1. you'd be sure to have go 1.2(golang) installed, and put $GOPATH/bin in your $PATH

  2. go get github.com/rnoldo/go-translate-cli
    or

    • git clone github.com/rnoldo/go-translate-cli.git
    • cd go-translate-cli
    • go install

##usage:

By default the tool auto-detects whether the first argument is Chinese or English and swaps the source/target accordingly:

translate hello --> 你好  
translate 你好 --> hello
translate "你好 golang" --> hello golang  
translate "hello golang" --> 你好 golang

If you need explicit control, pass language codes supported by translate.google.com:

translate --from en --to fr "good morning"
translate -f auto -t ja "大家早上好"

##and you can do more: if you are familar with go, you can fork it and hack on it to translate between any language pair supported by translate.google.com.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL