CultureInfo.CurrentCulture CultureInfo.CurrentCulture CultureInfo.CurrentCulture CultureInfo.CurrentCulture Property

Definição

Obtém ou define o objeto CultureInfo que representa a cultura usada pelo thread atual.Gets or sets the CultureInfo object that represents the culture used by the current thread.

public:
 static property System::Globalization::CultureInfo ^ CurrentCulture { System::Globalization::CultureInfo ^ get(); };
public static System.Globalization.CultureInfo CurrentCulture { get; }
member this.CurrentCulture : System.Globalization.CultureInfo
Public Shared ReadOnly Property CurrentCulture As CultureInfo

Valor da propriedade

Um objeto que representa a cultura usada pelo thread atual.An object that represents the culture used by the current thread.

Exceções

A propriedade é definida como null.The property is set to null.

Exemplos

O exemplo a seguir demonstra como alterar o CurrentCulture e CurrentUICulture o do thread atual.The following example demonstrates how to change the CurrentCulture and CurrentUICulture of the current thread.

using namespace System;
using namespace System::Globalization;
using namespace System::Threading;

int main()
{
   // Display the name of the current thread culture.
   Console::WriteLine("CurrentCulture is {0}.", CultureInfo::CurrentCulture->Name);
   
   // Change the current culture to th-TH.
   CultureInfo::CurrentCulture = gcnew CultureInfo("th-TH",false);
   Console::WriteLine("CurrentCulture is now {0}.", CultureInfo::CurrentCulture->Name);
   
   // Displays the name of the CurrentUICulture of the current thread.
   Console::WriteLine("CurrentUICulture is {0}.", CultureInfo::CurrentCulture->Name);
   
   // Changes the CurrentUICulture of the current thread to ja-JP.
   CultureInfo::CurrentUICulture = gcnew CultureInfo("ja-JP",false);
   Console::WriteLine("CurrentUICulture is now {0}.", CultureInfo::CurrentCulture->Name);
}
// The example displays the following output:
//       CurrentCulture is en-US.
//       CurrentCulture is now th-TH.
//       CurrentUICulture is en-US.
//       CurrentUICulture is now ja-JP.
using System;
using System.Globalization;
using System.Threading;

public class Example
{
   public static void Main()  
   {
      // Display the name of the current thread culture.
      Console.WriteLine("CurrentCulture is {0}.", CultureInfo.CurrentCulture.Name);

      // Change the current culture to th-TH.
      CultureInfo.CurrentCulture = new CultureInfo("th-TH", false);
      Console.WriteLine("CurrentCulture is now {0}.", CultureInfo.CurrentCulture.Name);

      // Display the name of the current UI culture.
      Console.WriteLine("CurrentUICulture is {0}.", CultureInfo.CurrentUICulture.Name);

      // Change the current UI culture to ja-JP.
      CultureInfo.CurrentUICulture = new CultureInfo( "ja-JP", false );
      Console.WriteLine("CurrentUICulture is now {0}.", CultureInfo.CurrentUICulture.Name);
   }
}
// The example displays the following output:
//       CurrentCulture is en-US.
//       CurrentCulture is now th-TH.
//       CurrentUICulture is en-US.
//       CurrentUICulture is now ja-JP.
Imports System.Globalization
Imports System.Threading

Public Module Example
   Public Sub Main()

      ' Display the name of the current thread culture.
      Console.WriteLine("CurrentCulture is {0}.", CultureInfo.CurrentCulture.Name)

      ' Change the current culture to th-TH.
      CultureInfo.CurrentCulture = New CultureInfo("th-TH", False)
      Console.WriteLine("CurrentCulture is now {0}.", CultureInfo.CurrentCulture.Name)

      ' Display the name of the current UI culture.
      Console.WriteLine("CurrentUICulture is {0}.", CultureInfo.CurrentUICulture.Name)

      ' Change the current UI culture to ja-JP.
      CultureInfo.CurrentUICulture = New CultureInfo("ja-JP", False)
      Console.WriteLine("CurrentUICulture is now {0}.", CultureInfo.CurrentUICulture.Name)
   End Sub 
End Module
' The example displays the following output:
'       CurrentCulture is en-US.
'       CurrentCulture is now th-TH.
'       CurrentUICulture is en-US.
'       CurrentUICulture is now ja-JP.

Comentários

O CultureInfo objeto retornado por essa propriedade e seus objetos associados determinam o formato padrão para datas, horas, números, valores de moeda, a ordem de classificação de texto, convenções de maiúsculas e minúsculas e comparações de cadeia de caracteres.The CultureInfo object that is returned by this property and its associated objects determine the default format for dates, times, numbers, currency values, the sorting order of text, casing conventions, and string comparisons.

A cultura atual é uma propriedade do thread em execução.The current culture is a property of the executing thread. Recuperar o valor da CultureInfo.CurrentCulture propriedade é um equivalente de melhor desempenho para recuperar o CultureInfo objeto retornado pela Thread.CurrentThread.CurrentCulture propriedade.Retrieving the value of the CultureInfo.CurrentCulture property is a more performant equivalent of retrieving the CultureInfo object returned by the Thread.CurrentThread.CurrentCulture property.

Observação

No .NET Framework 4.5.2 e versões anteriores, a CurrentCulture propriedade é somente leitura; ou seja, você pode recuperar o valor da propriedade, mas não pode defini-lo.In the .NET Framework 4.5.2 and earlier versions, the CurrentCulture property is read-only; that is, you can retrieve the property value, but you cannot set it. Para alterar a cultura atual, você atribui o CultureInfo objeto que representa a nova cultura Thread.CurrentThread.CurrentCulture à propriedade.To change the current culture, you assign the CultureInfo object that represents the new culture to the Thread.CurrentThread.CurrentCulture property. Começando com o .NET Framework 4.6.NET Framework 4.6, a CurrentCulture propriedade é de leitura/gravação; você pode definir e recuperar o valor da propriedade.Starting with the .NET Framework 4.6.NET Framework 4.6, the CurrentCulture property is read-write; you can both set and retrieve the property's value. Se você definir o valor da propriedade como um CultureInfo objeto que representa uma nova cultura, o valor Thread.CurrentThread.CurrentCulture da propriedade também será alterado.If you do set the property value to a CultureInfo object that represents a new culture, the value of the Thread.CurrentThread.CurrentCulture property also changes.

Nesta seção:In this section:

Como a cultura de um thread é determinada How a Thread's Culture Is Determined
Obtendo a cultura atual Getting the Current Culture
Definindo explicitamente a propriedade CurrentCulture Explicitly Setting the CurrentCulture Property
A cultura atual e as substituições de usuário The Current Culture and User Overrides
Aplicativos de cultura e do WindowsCulture and Windows Apps

Como a cultura de um thread é determinadaHow a Thread's Culture Is Determined

Quando um thread é iniciado, sua cultura é inicialmente determinada da seguinte maneira:When a thread is started, its culture is initially determined as follows:

  • Recuperando a cultura que é especificada pela DefaultThreadCurrentCulture Propriedade no domínio do aplicativo no qual o thread está sendo executado, se o valor da propriedade não nullfor.By retrieving the culture that is specified by the DefaultThreadCurrentCulture property in the application domain in which the thread is executing, if the property value is not null.

  • Se o thread for um thread do pool de threads que está executando uma operação assíncrona baseada em tarefa e .NET Framework 4.6.NET Framework 4.6 o aplicativo for direcionado para o ou uma versão posterior do .NET Framework, sua cultura será determinada pela cultura do thread de chamada.If the thread is a thread pool thread that is executing a task-based asynchronous operation and the app targets the .NET Framework 4.6.NET Framework 4.6 or a later version of the .NET Framework, its culture is determined by the culture of the calling thread. O exemplo a seguir altera a cultura atual para Português (Brasil) e lança seis tarefas, sendo que cada uma exibe sua ID de thread, sua ID de tarefa e sua cultura atual.The following example changes the current culture to Portuguese (Brazil) and launches six tasks, each of which displays its thread ID, its task ID, and its current culture. Cada uma das tarefas (e os threads) herdou a cultura do thread de chamada.Each of the tasks (and the threads) has inherited the culture of the calling thread.

    using System;
    using System.Collections.Generic;
    using System.Globalization;
    using System.Runtime.Versioning;
    using System.Threading;
    using System.Threading.Tasks;
    
    [assembly:TargetFramework(".NETFramework,Version=v4.6")]
    
    public class Example
    {
       public static async Task Main()
       {
          var tasks = new List<Task>();
          Console.WriteLine("The current culture is {0}", 
                            Thread.CurrentThread.CurrentCulture.Name);
          Thread.CurrentThread.CurrentCulture = new CultureInfo("pt-BR");
          // Change the current culture to Portuguese (Brazil).
          Console.WriteLine("Current culture changed to {0}",
                            Thread.CurrentThread.CurrentCulture.Name);
          Console.WriteLine("Application thread is thread {0}",
                            Thread.CurrentThread.ManagedThreadId);
          // Launch six tasks and display their current culture.
          for (int ctr = 0; ctr <= 5; ctr++)
             tasks.Add(Task.Run( () => {
                                   Console.WriteLine("Culture of task {0} on thread {1} is {2}",
                                                     Task.CurrentId, 
                                                     Thread.CurrentThread.ManagedThreadId,
                                                     Thread.CurrentThread.CurrentCulture.Name);
                                } ));                     
    
          await Task.WhenAll(tasks.ToArray());
       }
    }
    // The example displays output like the following:
    //     The current culture is en-US
    //     Current culture changed to pt-BR
    //     Application thread is thread 9
    //     Culture of task 2 on thread 11 is pt-BR
    //     Culture of task 1 on thread 10 is pt-BR
    //     Culture of task 3 on thread 11 is pt-BR
    //     Culture of task 5 on thread 11 is pt-BR
    //     Culture of task 6 on thread 11 is pt-BR
    //     Culture of task 4 on thread 10 is pt-BR
    
    Imports System.Collections.Generic
    Imports System.Globalization
    Imports System.Runtime.Versioning
    Imports System.Threading
    Imports System.Threading.Tasks
    
    <assembly:TargetFramework(".NETFramework,Version=v4.6")>
    
    Module Example
       Public Sub Main()
          Dim tasks As New List(Of Task)
          Console.WriteLine("The current culture is {0}", 
                            Thread.CurrentThread.CurrentCulture.Name)
          Thread.CurrentThread.CurrentCulture = New CultureInfo("pt-BR")
          ' Change the current culture to Portuguese (Brazil).
          Console.WriteLine("Current culture changed to {0}",
                            Thread.CurrentThread.CurrentCulture.Name)
          Console.WriteLine("Application thread is thread {0}",
                            Thread.CurrentThread.ManagedThreadId)
          ' Launch six tasks and display their current culture.
          For ctr As Integer = 0 to 5
             tasks.Add(Task.Run(Sub()
                                   Console.WriteLine("Culture of task {0} on thread {1} is {2}",
                                                     Task.CurrentId, 
                                                     Thread.CurrentThread.ManagedThreadId,
                                                     Thread.CurrentThread.CurrentCulture.Name)
                                End Sub))                     
          Next
          Task.WaitAll(tasks.ToArray())
       End Sub
    End Module
    ' The example displays output like the following:
    '     The current culture is en-US
    '     Current culture changed to pt-BR
    '     Application thread is thread 9
    '     Culture of task 2 on thread 11 is pt-BR
    '     Culture of task 1 on thread 10 is pt-BR
    '     Culture of task 3 on thread 11 is pt-BR
    '     Culture of task 5 on thread 11 is pt-BR
    '     Culture of task 6 on thread 11 is pt-BR
    '     Culture of task 4 on thread 10 is pt-BR
    

    Para obter mais informações, consulte a seção "operações assíncronas baseadas em cultura e tarefa CultureInfo " no tópico.For more information, see the "Culture and task-based asynchronous operations" section in the CultureInfo topic.

  • Chamando a função do GetUserDefaultLocaleName Windows.By calling the Windows GetUserDefaultLocaleName function.

Observe que se você definir uma cultura específica que seja diferente da cultura instalada pelo sistema ou da cultura preferida do usuário, e seu aplicativo iniciar vários threads, a cultura atual desses threads será a cultura retornada pelo GetUserDefaultLocaleName função, a menos que você atribua uma cultura DefaultThreadCurrentCulture à propriedade no domínio do aplicativo no qual o thread está sendo executado.Note that if you set a specific culture that is different from the system-installed culture or the user's preferred culture, and your application starts multiple threads, the current culture of those threads will be the culture that is returned by the GetUserDefaultLocaleName function, unless you assign a culture to the DefaultThreadCurrentCulture property in the application domain in which the thread is executing.

Para obter mais informações sobre como a cultura de um thread é determinada, consulte a seção "cultura e threads" CultureInfo na página de referência.For more information about how the culture of a thread is determined, see the "Culture and threads" section in the CultureInfo reference page.

Obtendo a cultura atualGetting the Current Culture

A CultureInfo.CurrentCulture propriedade é uma configuração por thread; ou seja, cada thread pode ter sua própria cultura.The CultureInfo.CurrentCulture property is a per-thread setting; that is, each thread can have its own culture. Você Obtém a cultura do thread atual recuperando o valor da CultureInfo.CurrentCulture Propriedade, como ilustra o exemplo a seguir.You get the culture of the current thread by retrieving the value of the CultureInfo.CurrentCulture property, as the following example illustrates.

using System;
using System.Globalization;

public class Example
{
   public static void Main()
   {
      CultureInfo culture = CultureInfo.CurrentCulture;
      Console.WriteLine("The current culture is {0} [{1}]",
                        culture.NativeName, culture.Name);
   }
}
// The example displays output like the following:
//       The current culture is English (United States) [en-US]
Imports System.Globalization

Module Example
   Public Sub Main()
      Dim culture As CultureInfo = CultureInfo.CurrentCulture
      Console.WriteLine("The current culture is {0} [{1}]",
                        culture.NativeName, culture.Name)
   End Sub
End Module
' The example displays output like the following:
'     The current culture is English (United States) [en-US]

Você também pode recuperar o valor da cultura do thread atual da Thread.CurrentThread propriedade.You can also retrieve the value of the current thread's culture from the Thread.CurrentThread property.

Definindo explicitamente a propriedade CurrentCultureExplicitly Setting the CurrentCulture Property

Em uma estrela com .NET Framework 4.6.NET Framework 4.6o, para alterar a cultura usada por um thread existente, você define a CultureInfo.CurrentCulture propriedade para a nova cultura.Staring with the .NET Framework 4.6.NET Framework 4.6, to change the culture that is used by an existing thread, you set the CultureInfo.CurrentCulture property to the new culture. Se você alterar explicitamente a cultura de um thread dessa forma, essa alteração persistirá se o thread cruzar os limites do domínio do aplicativo.If you explicitly change a thread's culture in this way, that change persists if the thread crosses application domain boundaries. O exemplo a seguir altera a cultura do thread atual para holandês (Países Baixos).The following example changes the current thread culture to Dutch (Netherlands). Ele também mostra que, quando o thread atual cruza os limites do domínio do aplicativo, sua cultura atual permanece alterada.It also shows that, when the current thread crosses application domain boundaries, its current culture remains changed.

using System;
using System.Globalization;
using System.Threading;

public class Info : MarshalByRefObject
{
   public void ShowCurrentCulture()
   {
      Console.WriteLine("Culture of {0} in application domain {1}: {2}",
                        Thread.CurrentThread.Name,
                        AppDomain.CurrentDomain.FriendlyName,
                        CultureInfo.CurrentCulture.Name);
   }
}

public class Example
{
   public static void Main()
   {
      Info inf = new Info();
      // Set the current culture to Dutch (Netherlands).
      Thread.CurrentThread.Name = "MainThread";
      CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("nl-NL");
      inf.ShowCurrentCulture();
      
      // Create a new application domain.
       AppDomain ad = AppDomain.CreateDomain("Domain2");
       Info inf2 = (Info) ad.CreateInstanceAndUnwrap(typeof(Info).Assembly.FullName, "Info");
       inf2.ShowCurrentCulture();                       
   }
}
// The example displays the following output:
//       Culture of MainThread in application domain ChangeCulture1.exe: nl-NL
//       Culture of MainThread in application domain Domain2: nl-NL
Imports System.Globalization
Imports System.Threading

Public Class Info : Inherits MarshalByRefObject
   Public Sub ShowCurrentCulture()
      Console.WriteLine("Culture of {0} in application domain {1}: {2}",
                        Thread.CurrentThread.Name,
                        AppDomain.CurrentDomain.FriendlyName,
                        CultureInfo.CurrentCulture.Name)
   End Sub
End Class

Module Example
   Public Sub Main()
      Dim inf As New Info()
      ' Set the current culture to Dutch (Netherlands).
      Thread.CurrentThread.Name = "MainThread"
      CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("nl-NL")
      inf.ShowCurrentCulture()
      
      ' Create a new application domain.
       Dim ad As AppDomain = AppDomain.CreateDomain("Domain2")
       Dim inf2 As Info = CType(ad.CreateInstanceAndUnwrap(GetType(Info).Assembly.FullName, "Info"),
                          Info)  
       inf2.ShowCurrentCulture()                       
   End Sub
End Module
' This example displays the following output:
'       Culture of MainThread in application domain Example.exe: nl-NL
'       Culture of MainThread in application domain Domain2: nl-NL

Observação

Alterar a cultura usando a CultureInfo.CurrentCulture propriedade requer uma SecurityPermission permissão com o ControlThread valor definido.Changing the culture by using the CultureInfo.CurrentCulture property requires a SecurityPermission permission with the ControlThread value set. A manipulação de threads é perigosa devido ao estado de segurança associado a threads.Manipulating threads is dangerous because of the security state associated with threads. Portanto, essa permissão deve ser dada somente ao código digno de confiança e, em seguida, somente conforme necessário.Therefore, this permission should be given only to trustworthy code, and then only as necessary. Não é possível alterar a cultura do thread no código semiconfiável.You cannot change thread culture in semi-trusted code.

Começando com o .NET Framework 4.NET Framework 4, você pode alterar explicitamente a cultura do thread atual para uma cultura específica (como o francês (Canadá)) ou uma cultura neutra (como em francês).Starting with the .NET Framework 4.NET Framework 4, you can explicitly change the current thread culture to either a specific culture (such as French (Canada)) or a neutral culture (such as French). Quando um CultureInfo objeto representa uma cultura neutra, os valores das CultureInfo DateTimeFormatpropriedades NumberFormat Calendar CompareInfo, como,,, e TextInfo refletem a cultura específica associada ao cultura neutra.When a CultureInfo object represents a neutral culture, the values of CultureInfo properties such as Calendar, CompareInfo, DateTimeFormat, NumberFormat, and TextInfo reflect the specific culture that is associated with the neutral culture. Por exemplo, a cultura dominante para a cultura neutra em inglês é inglês (Estados Unidos); a cultura dominante para a cultura alemã é alemão (Alemanha).For example, the dominant culture for the English neutral culture is English (United States); the dominant culture for the German culture is German (Germany). O exemplo a seguir ilustra a diferença na formatação quando a cultura atual é definida como uma cultura específica, francês (Canadá) e uma cultura neutra, francês.The following example illustrates the difference in formatting when the current culture is set to a specific culture, French (Canada), and a neutral culture, French.

using System;
using System.Globalization;
using System.Threading;

public class Example
{
   public static void Main()
   {
      double value = 1634.92;
      CultureInfo.CurrentCulture = new CultureInfo("fr-CA");
      Console.WriteLine("Current Culture: {0}", 
                        CultureInfo.CurrentCulture.Name);
      Console.WriteLine("{0:C2}\n", value);
      
      Thread.CurrentThread.CurrentCulture = new CultureInfo("fr");
      Console.WriteLine("Current Culture: {0}", 
                        CultureInfo.CurrentCulture.Name);
      Console.WriteLine("{0:C2}", value);
   }
}
// The example displays the following output:
//       Current Culture: fr-CA
//       1 634,92 $
//       
//       Current Culture: fr
//       1 634,92 €
Imports System.Globalization
Imports System.Threading

Module Example
   Public Sub Main()
      Dim value As Double = 1634.92
      CultureInfo.CurrentCulture = New CultureInfo("fr-CA")
      Console.WriteLine("Current Culture: {0}", 
                        CultureInfo.CurrentCulture.Name)
      Console.WriteLine("{0:C2}", value)
      Console.WriteLine()
      
      Thread.CurrentThread.CurrentCulture = New CultureInfo("fr")
      Console.WriteLine("Current Culture: {0}", 
                        CultureInfo.CurrentCulture.Name)
      Console.WriteLine("{0:C2}", value)
   End Sub
End Module
' The example displays the following output:
'       Current Culture: fr-CA
'       1 634,92 $
'       
'       Current Culture: fr
'       1 634,92 €

Você também pode usar a CultureInfo.CurrentCulture Propriedade junto com a HttpRequest.UserLanguages propriedade para definir a CurrentCulture propriedade de um aplicativo ASP.net para a cultura preferencial do usuário, como ilustra o exemplo a seguir.You can also use the CultureInfo.CurrentCulture property along with the HttpRequest.UserLanguages property to set the CurrentCulture property of an ASP.NET application to the user's preferred culture, as the following example illustrates.

CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture(Request.UserLanguages[0]);
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(Request.UserLanguages(0))

A cultura atual e as substituições de usuárioThe Current Culture and User Overrides

O Windows permite que os usuários substituam os valores de CultureInfo propriedade padrão do objeto e seus objetos associados usando Opções regionais e de idioma no painel de controle.Windows allows users to override the standard property values of the CultureInfo object and its associated objects by using Regional and Language Options in Control Panel. O CultureInfo objeto retornado CurrentCulture pela propriedade reflete essas substituições de usuário nos seguintes casos:The CultureInfo object returned by the CurrentCulture property reflects these user overrides in the following cases:

  • Se a cultura do thread atual for definida implicitamente pela função GetUserDefaultLocaleName do Windows.If the current thread culture is set implicitly by the Windows GetUserDefaultLocaleName function.

  • Se a cultura do thread atual definida pela DefaultThreadCurrentCulture Propriedade corresponder à cultura atual do sistema do Windows.If the current thread culture defined by the DefaultThreadCurrentCulture property corresponds to the current Windows system culture.

  • Se a cultura do thread atual for definida explicitamente para uma cultura retornada pelo CreateSpecificCulture método, e essa cultura corresponder à cultura do sistema do Windows atual.If the current thread culture is set explicitly to a culture returned by the CreateSpecificCulture method, and that culture corresponds to the current Windows system culture.

  • Se a cultura do thread atual for definida explicitamente para uma cultura instanciada pelo CultureInfo(String) Construtor e essa cultura corresponder à cultura do sistema do Windows atual.If the current thread culture is set explicitly to a culture instantiated by the CultureInfo(String) constructor, and that culture corresponds to the current Windows system culture.

Em alguns casos, especialmente para aplicativos de servidor, a definição da cultura atual CultureInfo como um objeto que reflete as substituições do usuário pode ser indesejável.In some cases, particularly for server applications, setting the current culture to a CultureInfo object that reflects user overrides may be undesirable. Em vez disso, você pode definir a cultura do thread CultureInfo atual para um objeto que não reflete as substituições do usuário das seguintes maneiras:Instead, you can set the current thread culture to a CultureInfo object that does not reflect user overrides in the following ways:

A cultura atual e os aplicativos UWPThe current culture and UWP apps

Em aplicativos plataforma universal do Windows (UWP), a CurrentCulture propriedade é de leitura/gravação, assim como acontece em aplicativos .NET Framework e .NET Core; você pode usá-la para obter e definir a cultura atual.In Universal Windows Platform (UWP) apps, the CurrentCulture property is read-write, just as it is in .NET Framework and .NET Core apps; you can use it both to get and to set the current culture. No entanto, os aplicativos UWP não fazem distinção entre a cultura atual e a cultura da interface do usuário atual.However, UWP apps do not distinguish between the current culture and the current UI culture. As CurrentCulture propriedades CurrentUICulture e são mapeadas para o primeiro valor na coleção Windows. ApplicationModel. Resources. Core. ResourceManager. DefaultContext. Languages .The CurrentCulture and CurrentUICulture properties map to the first value in the Windows.ApplicationModel.Resources.Core.ResourceManager.DefaultContext.Languages collection.

Em aplicativos .NET Framework e .NET Core, a cultura atual é uma configuração por thread e a CurrentCulture propriedade reflete a cultura do thread atual somente.In .NET Framework and .NET Core apps, the current culture is a per-thread setting, and the CurrentCulture property reflects the culture of the current thread only. Em aplicativos UWP, a cultura atual é mapeada para a propriedade Windows. ApplicationModel. Resources. Core. ResourceManager. DefaultContext. Languages , que é uma configuração global.In UWP apps, the current culture maps to the Windows.ApplicationModel.Resources.Core.ResourceManager.DefaultContext.Languages property, which is a global setting. Definir a CurrentCulture propriedade altera a cultura do aplicativo inteiro; a cultura não pode ser definida por thread.Setting the CurrentCulture property changes the culture of the entire app; culture cannot be set on a per-thread basis.

Segurança

SecurityPermission
para definir a cultura atual.for setting the current culture. Enumeração associada: ControlThreadAssociated enumeration: ControlThread

Aplica-se a

Veja também