Csharp/CSharp Tutorial/I18N Internationalization/CurrentUICulture — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 15:31, 26 мая 2010
Set CurrentCulture to new CultureInfo("de-AT-ST")
using System;
using System.Collections.Generic;
using System.Text;
using System.Globalization;
class Program {
static void Main(string[] args) {
CultureInfo ci = new CultureInfo("de-AT-ST");
System.Threading.Thread.CurrentThread.CurrentCulture = ci;
System.Threading.Thread.CurrentThread.CurrentUICulture = ci;
}
}
Set the current UI culture for the executing thread
using System;
using System.Globalization;
using System.Threading;
class MainClass
{
public static void Main()
{
Thread.CurrentThread.CurrentUICulture=new CultureInfo("fr-FR");
Console.WriteLine(Thread.CurrentThread.CurrentUICulture.Name);
}
}
fr-FR