Popularity
4.1
Stable
Activity
0.0
Stable
14
3
2
Programming language: Crystal
License: MIT License
Tags:
Third-party APIs
Latest version: v0.2.1
google_translate alternatives and similar shards
Based on the "Third-party APIs" category.
Alternatively, view google_translate alternatives based on common mentions on social networks and blogs.
-
GDAX
๐ GDAX REST and WebSocket API wrapper to trade blockchain cryptocurrencies like bitcoin, Litecoin and Ethereum.
WorkOS - The modern identity platform for B2B SaaS
The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Promo
workos.com
Do you think we are missing an alternative of google_translate or a related project?
README
Crystal GoogleTranslate
Crystal client for GoogleTranslate
Installation
Add this to your application's shard.yml
:
dependencies:
google_translate:
github: greyblake/crystal-google_translate
Usage
require "google_translate"
Example
The following code translates german word tanzen
with a typo(double n) and prints the result:
client = GoogleTranslate::Client.new
tr = client.translate("de", "en", "tanzenn")
puts "#{tr.source_lang} -> #{tr.target_lang}"
puts "Query: #{tr.query}"
puts "Corrected query: #{tr.corrected_query}"
puts "Text: #{tr.text}"
tr.variants.each do |word_class, words|
puts word_class
words.each do |word|
puts " #{word}"
end
end
Output:
de -> en
Query: tanzenn
Corrected query: tanzen
Text: dance
verb
dance
hop
spin
bob
foot
Development
To run specs:
crystal spec
Contributors
- greyblake Sergey Potapov - creator, maintainer