Skip to content

Instantly share code, notes, and snippets.

@marknutter
Created October 21, 2010 22:18
Show Gist options
  • Save marknutter/639479 to your computer and use it in GitHub Desktop.
Save marknutter/639479 to your computer and use it in GitHub Desktop.
module GoogleTranslate
class LanguageDetect
def self.detect(text)
response = google_api_call(text,"#{SERVICE}",DetectResponse)
return nil if !response.is_reliable
response.language # return value
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment