Detects the language used in a text in JS (< 6k).
JavaScript HTML Batchfile
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
bower.json
build.bat
diacriticsMap.js
languageDetector.js
languageDetector.min.js
languageDetector.min.js.map
languagesNgramsMap.js
package.json
test.html

README.md

language-detector

Light (< 6k), fast and reliable language detector in JS. It does work even with relatively short texts.

NPM

Build Status dependencies Status devDependencies Status NSP Status


Installation

Manual

Just download the languageDetector.min.js file and include it in your project.

Bower

bower install language-detector

Usage

You just have to call it : detectLanguage(myTextToAnalyse) and the returned value is the two characters language code.

Supported languages

  • English (en)
  • French (fr)
  • Spanish (es)
  • Portuguese (pt)