https://github.com/pcboy/wordref
Tiny wrapper for the Wordreference API
https://github.com/pcboy/wordref
Last synced: about 1 year ago
JSON representation
Tiny wrapper for the Wordreference API
- Host: GitHub
- URL: https://github.com/pcboy/wordref
- Owner: pcboy
- License: other
- Created: 2013-03-31T12:39:04.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2018-01-11T07:35:32.000Z (over 8 years ago)
- Last Synced: 2025-02-12T15:17:45.866Z (over 1 year ago)
- Language: Ruby
- Size: 58.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://travis-ci.org/pcboy/wordref)
[](http://badge.fury.io/rb/wordref)
[](https://codeclimate.com/github/pcboy/wordref)
# Wordref
Wordref is a tiny gem to get a translation from Word reference (no API key needed).
You can translate words from one language to another ([Wordreference supported languages](https://github.com/pcboy/wordref/commit/25b4a4fef89e40cce6ae018501041aa6584538d8#diff-43114cec6cc4579b1d10b1d75031e5b5R52))
## Installation
Add this line to your application's Gemfile:
gem 'wordref'
And then execute:
$ bundle
Or install it yourself as:
$ gem install wordref
## Usage
wr = Wordref::Wordref.new
wr.translate(from: 'en', to: 'fr', word: 'cat') # => "chat"
If you don't give the "from" parameter it'll automatically be set to english.
That's all.
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request