Alternatives
Members may post updates or alternatives to this current article in order to show different
approaches or add new features.
If your string is big enough you may attempt a heuristic approach: build a dictionary with most frequent terms for all the languages your application supports and then find 'the best match' on the give string.
First of all, just by having in the text some specific characters from unicode chart, does not mean, that we have identified the language. This might be an extra evaluation, but can not be the only one. And one thing is to estimate if the text is from a short list of languages (let's say, up to...
var text = "¿Dónde está el baño?";google.language.detect(text, function(result) { if (!result.error) { var language = 'unknown'; for (l in google.language.Languages) { if (google.language.Languages[l] == result.language) { language = l; break; } ...
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.