Hi,
How can i recognise the language of text in c#?
Jitendra
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
jit sunPosted Feb 1, 2012, 8:14 AM
Prasant JinagaPosted Feb 1, 2012, 7:56 AM
If you have access to Internet you can Use Google API's for Language Detection.
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;
}
}
var container = document.getElementById("detection");
container.innerHTML = text + " is: " + language + "";
}
});
Thanks,
Prasant