talhaHavadar / QuickTranslator

A quick translation script which uses the yandex translate api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QuickTranslator

The basic ruby program that uses yandex's tranlate API. Simply converts languages. Default Destination language is Turkish.


Requirements


Usage

You can change destination language easily in src/main.rb

translator = Translator.new

translator.dest_lang = Translator::TURKISH # For convert to turkish
translator.dest_lang = Translator::ENGLISH # For convert to english
# you can use country code as well
translator.dest_lang = 'tr' # like this

This program also need a config file that is hidden in this repository but you can create yourself. Example /src/config.rb file looks like this.

module Config

    API_KEY = "YOUR_AWESOME_YANDEX_API_KEY"
    NODE_NOTIFY = __dir__ + "/../notify.js"

end

You can add custom shortcut to run this program.

About

A quick translation script which uses the yandex translate api

License:MIT License


Languages

Language:Ruby 62.3%Language:JavaScript 37.7%