Franc
A simple ruby wrapper to Titus Wormer's awesome javascript language detection called Franc.
Description
At this time, this gem depends on a system wide npm installation of franc and runs a bash command within ruby to invoke the franc javascript.
If you do not have franc installed, this gem will install it for you on the first run by using npm. If you don't have npm installed or are not sure what it is, check out the docs.
Here are all supported languages.
Installation
$ gem install franc
Set Up
require 'franc'
How it works
Franc is included in the String class and can be called on any string using the language
method:
'Alle menslike wesens word vry'.language
# => "afr"
'এটি একটি ভাষা একক IBM স্ক্রিপ্ট'.language
# => "ben"
'Alle mennesker er født frie og'.language
# => "nno"
'asdfasdf'.language
# => "und"
License
Copyright (c) 2015 John Mason