translate

command module
v0.0.0-...-09fb60c Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: MIT Imports: 1 Imported by: 0

README

translate

License

This is a tool for translation and file format converting.

For file format, we currently support json, yaml, properties and typescript.

For translation client, we currently use Aliyun machine translation.

Installation

go get -u github.com/hyperjiang/translate

File converter

translate file -i "input-file" -o "output-file"

Translator

For translation, we only support simple single-layer key-value format, e.g.

{
    "key1": "value1",
    "key2": "value2",
}

or

key1: value1
key2: value2

or

key1=value1
key2=value2
Use Aliyun machine translation

Setup environment variables:

export ALI_REGION_ID="cn-hangzhou"
export ALI_ACCESS_KEY_ID="your-key"
export ALI_ACCESS_SECRET="your-secret"
translate aliyun -i "input-file" -o "output-file" -s source-language -t target-language

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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