RailsTweeter
RailsTweeter

Reputation: 1635

Ruby Rails Gem to detect other language

Is there a gem to detect if a language is non-english?

I need to pass in a string and if it is not english, return an appropriate value.

Thanks

Upvotes: 3

Views: 673

Answers (3)

kakubei
kakubei

Reputation: 5400

I'm using CLD which I really like, succinct and easy to use, give it a try.

Upvotes: 2

Benjamin
Benjamin

Reputation: 10393

WhatLanguage gem is your best bet. But it is not perfect, though.

Upvotes: 2

svilenv
svilenv

Reputation: 1484

There is a gem for the Google translate API, that handles, among other things, language detection. It's a paid service though: https://developers.google.com/translate/v2/libraries

Upvotes: 2

Related Questions