> how to determine what language a c# string is written in? is there any C#
> method to take a string and return what language it is in? e.g. english,
> hindi, spanish, etc.
There is nothing standard in C#, .NET, Win32, whatever.
And there is no 100% reliable method to do that.
In what language is "chat"? Is is English, or French (cat)?
The longer the text, the better the chances, but nothing can be 100%
reliable.
But there are some decent statistical methods.
Here are some links (or Google for language identification algorithm):
http://people.csail.mit.edu/hazen//publications/masters_thesis.pdf
http://complingone.georgetown.edu/~langid/acq_info.html
http://search.cpan.org/dist/Text-Language-Guess/

Signature
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
Alvin Bruney [ASP.NET MVP] - 30 Jan 2008 13:50 GMT
I think he was asking about the run-time langauge and not 'speaking
language'. If that's the case, OP can get the current culture and language
from the thread of execution. That would work for local applications. If the
string is remoted from another appdomain, you can find the executing thread
as well.

Signature
Regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------
>> how to determine what language a c# string is written in? is there any C#
>> method to take a string and return what language it is in? e.g. english,
[quoted text clipped - 13 lines]
> http://complingone.georgetown.edu/~langid/acq_info.html
> http://search.cpan.org/dist/Text-Language-Guess/
Mythran - 30 Jan 2008 16:39 GMT
> I think he was asking about the run-time langauge and not 'speaking
> language'. If that's the case, OP can get the current culture and language
[quoted text clipped - 6 lines]
>>> method to take a string and return what language it is in? e.g. english,
>>> hindi, spanish, etc.
The last sentence in the OP leads me, as well as Mihal, to believe that the
OP'er is asking about spoken language (where the e.g. part is 'english,
hindi, spanish, etc.').
:)
Mythran