1

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)

4

1 回答 1

1

我最初发布了一个检测语言的链接,但真正的答案实际上在这里:

如何检测字符串的语言?

希望这有助于交配

于 2013-06-26T07:20:43.043 回答