I know how to read and write the language if i already know the language..For example here is the code to read and write russian language.
public string FileRead(string filename, String Contents)
{
Contents = File.ReadAllText(filename,Encoding.GetEncoding("iso-8859-5"));
return Contents;
}
public void FileWrite(string contents)
{
System.IO.File.WriteAllText("C:\\pathe.txt", contents,Encoding.UTF8);
}
But my problem is that if i don't know the language then how can i detect that particular language automatically and then go to that particular code.(i.e in case of russian language,this code)