No commit activity in last 3 years
No release in over 3 years
"This gem scraps GoogleTranslate and returns the translation for the given search phrase. If multiple translations are available, multiple are returned."
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 2.10.0

Runtime

 Project Readme

GoogleTranslateScraper

This gem scraps GoogleTranslate and returns the translation for the given search phrase.

If multiple translations are available, multiple are returned.

Installation

Add this line to your application's Gemfile:

gem 'google_translate_scraper'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install google_translate_scraper

Usage

1- require 'google_translate_scraper'

2- response = GoogleTranslateScraper.translate(:source_language => 'en', :target_language => 'sv', :search_text => 'hey')

3- response.translations.first

NOTE: source and target language values must be a string containg the ISO 639-1 two letter code for that language. For a list see here: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request