Questions tagged [currentuiculture]

69 questions
35
votes
6 answers

Setting Culture (en-IN) globally in WPF application

I have an application, which is based for India, and I'm setting Culture as: Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-IN"); The above code is called before the Window.InitializeComponent() method is called. Still this is showing…
Varun Jain
  • 1,015
  • 2
  • 13
  • 19
13
votes
3 answers

creating custom CultureInfo for country, language combination

I am working on a .net 4.5 application that needs to be mult lingual supporting multi cultures etc. The following is sample list of Countries/Languages Russia / Russian Belgium / French Belgium / Dutch For all the above, there is a CultureInfo…
amateur
  • 43,371
  • 65
  • 192
  • 320
11
votes
1 answer

ASP.NET MVC (Async) CurrentCulture is not shared between Controller and View

I have an ASP.NET MVC 4 application that is targeting .NET Framework 4.7.1, with the problem that the culture is not shared between Controller and View, if the action contains async calls. I am referencing the NuGet package Microsoft.AspNet.Mvc…
11
votes
7 answers

Accessing resource strings with CultureInfo in .NET

Another simple questions. I have website with different languages. If I want to access a string from the resource file I would use it like this Resources.MyResourceFile.MyStringIdentifier Very easy. That way I know during compile time, that the…
8
votes
2 answers

CurrentUICulture ignores Region and Language settings

Assorted settings in the Windows 7 Region and Language dialog supply values to the properties of the CurrentCulture object. However, WPF controls seem to use CurrentUICulture instead, resulting in a total failure to respect the user's preferences.…
Peter Wone
  • 17,965
  • 12
  • 82
  • 134
8
votes
1 answer

Change UI culture in WinRT

Is it possible to change the UI Culture in WinRT on-the-fly? I've found ApplicationLanguages.PrimaryLanguageOverride = "en";, but this only works before showing the app UI and not afterwards (e.g. I want to change the UI language through the…
Matthias
  • 3,403
  • 8
  • 37
  • 50
8
votes
3 answers

Error MSB4185: "System.Globalization.CultureInfo" has not been enabled for execution

When trying to build in MonoDevelop with Mono for Android I get this error. According to the debug it is not located in my code so im left clueless. Any idea? Error MSB4185: The function "CurrentUICulture" on type …
6
votes
1 answer

Why is CurrentUICulture "DE-DE" even though I have set up "DE-CH" in Windows

In my WPF application the CurrentUICulture is not properly taken over by Windows or is wrongly stored in Windows. The region and language settings in Windows are in all places that I have found "Deutsch (Schweiz)". CurrentUICulture in the…
Adrian
  • 101
  • 6
5
votes
2 answers

CurrentThread.CurrentUICulture is set correctly but get always en-US

I am working on a multilingual website with two languages to start with Arabic and English I have set language to Arabic (ar-ae) in IE and also on FireFox but it always get me the English version i am not able to troubleshoot this issue Site…
Learning
  • 19,469
  • 39
  • 180
  • 373
4
votes
2 answers

Localizable WPF Application - UICulture settings lead to Resource problems

I want to create aa localizable WPF Application. I've followed the instructions in the comments of the AssemblyInfo.cs file: //In order to begin building localizable applications, set //CultureYouAreCodingWith in your .csproj…
0xbadf00d
  • 17,405
  • 15
  • 67
  • 107
3
votes
3 answers

How do I set the UI language for a multi-threaded .NET process, independent of the OS language?

Problem: I have a C# .NET 2.0 application developed on Windows 7 that has translated resources for multiple languages (ex. zh-CHS for Chinese, es for Spanish, etc.). I have a customer who wants to run their Windows 7 OS in English, but run my .NET…
3
votes
3 answers

FxCop CA1305: CurrentCulture vs. CurrentUICulture

So, I have a few resource files for localization. They're strings that can be formatted. For example: MyResource.resx Title: "MyApp - Ver: {0}" I then return it by doing like so: public String Title { get { return…
myermian
  • 31,823
  • 24
  • 123
  • 215
3
votes
1 answer

Fully change language (including Culture) for the current PowerShell session

My Win 10 system has Spanish language. I mean to fully operate a PowerShell session in English. Across everything I tried (see below), I managed to change the UICulture to en-US for the current session, but not the Culture. Is there any way I can…
3
votes
1 answer

Are Thread.CurrentThread.CurrentUICulture and CultureInfo.CurrentUICulture always in sync?

In a .NET application, it seems you can get or set the current (UI) culture via System.Threading.Thread.CurrentThread.CurrentUICulture or via System.Globalization.CultureInfo.CurrentUICulture Is one to be preferred over the other? Or is…
Peter
  • 13,733
  • 11
  • 75
  • 122
3
votes
3 answers

Where can I set the initial value of CurrentUICulture in Windows XP?

I'm trying to make my application support multiple languages. I've made some satellite assemblies and now I want to test what the app will look like when run on a French machine, for example. In [Control Panel->Regional And Language Options] I can…
demoncodemonkey
  • 11,730
  • 10
  • 61
  • 103
1
2 3 4 5