所以,我直言不讳 我有两个问题
第一: 如何在C#应用程序中启用多语言? 例如,我写了这个:
static void Main()
{
Console.WriteLine("Dude, what's up?"); //English
Console.WriteLine("אחי, מה קורה?"); //Hebrew
Console.WriteLine("好傢伙,這是怎麼回事?"); //Chinese
Console.WriteLine("おい、最大何ですか?"); //Japanese
string answer = Console.ReadLine();
if (answer.Language == Hebrew)
Console.WriteLine("You wrote on: {0}", answer.Language);
else if (answer.Language == Japanese)
//Do something else...
//And so on and on...
Console.ReadKey();
}
它打印我的cmd.exe:
那么,如何在我的C#应用程序中启用希伯来语和中文及更多语言?
我的第二个问题是:
我如何获得字符串的语言?
if (answer.Language == Hebrew)
Console.WriteLine("You wrote on: {0}", answer.Language);
else if (answer.Language == Japanese)
//Do something else...