Questions tagged [currentculture]

a Thread property in the .NET System.Threading namespace or a CultureInfo property in the .NET System.Globalization namespace

CurrentCulture refers to either the Thread.CurrentCulture property in the .NET System.Threading namespace or the CultureInfo.CurrentCulture property in the .NET System.Globalization namespace.

In both cases, this property is used to get or set the System.Globalization.CultureInfo object that represents the culture of the current thread.

Resources

Related Tags

139 questions
1
vote
1 answer

Reading values with dataset messes up specific language characters dependending on client OS

I have made a windows application using C# that creates a dataset with data from a Dbase database file using a OleDBConnection. My problem is that this runs just fine on my own computer (swedish) but when i run this on my server (english) the…
Andreas
  • 301
  • 1
  • 4
  • 16
1
vote
1 answer

How to make culture setting match the OS setting in Blazor WebAssembly?

Chrome, Firefox, and Edge all seem to use the OS's setting, not the client's "Accept-Language" setting, in determining what date format to use in the control. My problem is, the rest of my site uses the "Accept-Language" setting to determine the…
Patrick Szalapski
  • 8,738
  • 11
  • 67
  • 129
1
vote
0 answers

Set CultureInfo.CurrentCulture sets also CurrentUICulture and vice versa

For some reason, when setting in my app CultureInfo.CurrentCulture to 'de-CH', it automatically sets CultureInfo.CurrentUICulture to 'de-CH' too. If I do it the inverse way, it is happenning too. My system is in 'en-US' private void…
1
vote
1 answer

PowerShell scope of changes in lines with multiple commands - UICulture

During my tinkering with PS 5.1 related to the objective of question Fully change language for the current PowerShell session I observed a "strange" behavior: > [system.threading.thread]::currentthread.currentculture ;…
1
vote
2 answers

Better way to get browser culture in Blazor webassembly / client app

I know how to get the current culture information for Blazor server app by using HTTPContext with IRequestCultureFeature. Is there any better way to get current browser culture in Blazor webassembly (wasm) / client app?
1
vote
1 answer

resourcemanager uses wrong UICulture to serve content! Always returns neutral culture

Possible Duplicate: CurrentThread.CurrentUICulture is set correctly but seems to be ignored by asp.net I've asked on many forums, but no one seems to be able to help me! default.aspx:
Peter
  • 59
  • 3
  • 11
1
vote
0 answers

Confusing about Culture, FlowDirection and Language

i am trying to globalization in my wpf application but i am confused about Culture, Language and flowdirection issue. I am trying to switch between english and arabic language in my application. I search about this issue but i am really confused. I…
bluebird
  • 41
  • 3
1
vote
1 answer

Issue with English non-US Culture

I am able to use Set-Culture (Powershell as Admin) to set the Current Culture to "en-DE" which is English (Germany). However, when I run the different PS commands to view the Current Culture, I am still getting en-US. I checked my Region (Format)…
vee
  • 389
  • 5
  • 19
1
vote
3 answers

Changing CurrentUICulture at runtime in a Localizable Form in WinForms

I have been searching about how to change the language of a Form that has the Localizable attribute set to true. https://msdn.microsoft.com/en-us/library/system.threading.thread.currentuiculture(v=vs.110).aspx This is to set the language of the…
z3nth10n
  • 2,341
  • 2
  • 25
  • 49
1
vote
3 answers

convert universal datetime to datetime based on cultureinfo provided

I generate a datetime value from my javascript client to UTC format I need to be able to convert this datetime value into the date and time of particular culture. I do this to get datetime new Date().toUTCString(); // "Tue, 13 Jun 2017 07:44:58…
user581157
  • 1,327
  • 4
  • 26
  • 64
1
vote
0 answers

ASP.NET MVC5 Change Language using Route

I'm new using MVC5 and I try to do a website with different language. So far I do some configuration and when I click a different language it changes the url but it doesn't change the text in view. Here is my code if anyone have idea: In App_Data…
usertfwr
  • 309
  • 1
  • 6
  • 31
1
vote
1 answer

Get current computer datetimeformat

Hi I am new to web programming and I have an mvc app which runs on azure. There is a functionality where users can export grid data to csv and one of the fields is a datetime field. When the user clicks on export I take whatever is in the grid,…
Amitesh
  • 23
  • 3
1
vote
1 answer

In ModelState the Date format is not valid while editing Kedno grid

I am developing MVC application with Kedno grid. I have a model Item with properties: public bool IsPaid { get; set; } public Nullable PaymentDate { get; set; } In Kedno grid in the View: columns.Bound(c =>…
1
vote
2 answers

ASP.NET MVC 5 localization resources freeze and do not change language despite changing CurrentThread.CurrentCulture

I have an ASP.NET MVC 5 WEB Application running under a website in IIS 8 where I need to change language programmatically at runtime by a user preference that I read from a DB and store in a session variable, and this value can change during runtime…
1
vote
1 answer

When should I use Neutral culture? What is the necessary for it? why not force using Specific Culture?

When should I use Neutral culture? What is the necessary for it? why not force using Specific Culture? Can someone tell me a real time scenario, where Neutral cultures are used than Specific Culture?
Rajes
  • 1,036
  • 10
  • 15