Bt

Bt makes it easy to use Baidu translator in your terminal. Just try it!

Installation

 $ gem install bt

Usage

  bt 'from' 'to' 'text'

or

  bt 'text'

Example:

  bt en zh 'how are you'
  => "你好吗"

  bt '你为什么这么帅?'
  => "Why are you so handsome?"

  bt zh kor '你为什么这么帅?'
  => 너 왜 이렇게 멋있니?

Language codes:

  • english - en
  • polish - pl
  • french - fr
  • spanish - es
  • slovakian - sk
  • chinese - zh
  • russian - ru
  • korean - kor
  • automatic source language detection - auto

find all available language codes

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/vaucn/bt. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.