currentculture Questions

2

I'm using HangFire 1.6 in an asp.net WebApi2 solution with Owin. The server is setup for one culture (da-DK) - I cannot change this. My application must use another culture (en-US) to correctly pa...
Pearle asked 20/11, 2017 at 16:22

11

Solved

What is the best way to parse a float in CSharp? I know about TryParse, but what I'm particularly wondering about is dots, commas etc. I'm having problems with my website. On my dev server, the ',...
Chasidychasing asked 29/9, 2008 at 7:23

5

Solved

I have a unit-test that relies on a specific culture. In FixtureSetup, I set both Thread.CurrentThread.CurrentCulture and Thread.CurrentThread.CurrentUICulture to the desired value (en-US). When...
Gearalt asked 19/1, 2011 at 7:35

1

Solved

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.threa...
Adalbertoadalheid asked 15/7, 2020 at 7:3

6

Solved

How to identify the operating system's language using CultureInfo? E.g. if the language in Windows is set to French, I need to identify French and load the fr resource files data.
Thornberry asked 17/11, 2010 at 19:20

2

I am not too familiar with date time. I am currently wonder how can I convert the existing time of the device to a different countries' date/time. E.g. App.CurrentDate <- which display the dev...
Asexual asked 19/10, 2017 at 4:13

1

Solved

I try to implement multicultural application where users able to change language, date format and etc. I wrote core but it returns Exception: System.InvalidOperationException: Instance is read-only...
Octillion asked 5/7, 2019 at 8:18

8

Solved

In my case: I have a TextBlock Binding to a property of type DateTime. I want it to be displayed as the Regional settings of the User says. <TextBlock Text="{Binding Date, StringFormat={}{0:d}...
Jerkin asked 29/4, 2011 at 11:33

1

Solved

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 ...
Dingy asked 16/4, 2018 at 20:57

1

Solved

I have a VSTS account within the region of US. And I have a bunch of Unit tests, which run successfully on my local server. But when deployed to the VSTS, all the tests related to the date time are...

3

I'm trying to get my clients' country, so I use CultureInfo.CurrentCulture. Problem is that when my Canadian customers use my website, they're showing up as American. It looks like CultureInfo.Cur...
Guesswarp asked 28/6, 2010 at 17:9

1

Solved

I'm using automatic globalization on an ASP MVC website. It works fine until it reached a parallel block: public ActionResult Index() { // Thread.CurrentThread.CurrentCulture is automatically s...

1

Solved

string s = "Gewerbegebiet Waldstraße"; //other possible input "Waldstrasse" int iFoundStart = s.IndexOf("strasse", StringComparison.CurrentCulture); if (iFoundStart > -1) s = s.Remove(iFoundSt...
Insolvency asked 5/11, 2015 at 18:15

4

I'm having some problems in Windows 8 Metro apps (XAML & C#) regarding the user's regional settings. It seems that the apps won't respect user's regional settings, so even if your Windows 8 is ...

4

Solved

Using: Console.WriteLine(System.Globalization.CultureInfo.CurrentCulture.ToString()); I get "en-US". What should I change in my control panel settings ( Region and Language ? ) to get so...
Twodimensional asked 23/1, 2014 at 17:50

3

Solved

Well, I am trying to get the default date format of a culture. For example en-us has "m/dd/yyyy" , en-uk 'd/mm/yyyy'. Culture could be anything at the client machine. and Dateformat can also be a...
Helles asked 13/12, 2012 at 2:10

4

Solved

It strikes me as an odd design choice that the current culture information (CurrentCulture and/or CurrentUICulture) is a a property of the running thread. At the very least it seems like the scope ...
Eldreeda asked 14/11, 2010 at 3:32

2

Solved

What is the best practice for specifying CurrentCulture or InvariantCulture and not specifying the culture at all? From what I have read, if you're doing serialization, for instance, you need Inv...
Lickspittle asked 12/7, 2010 at 19:3

2

Solved

From what I have researched it is not possible to change the Timezone of a thread. So my question is why can't you? I would have thought switching your application's culture to a specific country ...
Paraffinic asked 30/5, 2010 at 12:27

1

We develop an established software which works fine on all known computers except one. The problem is to parse strings that begin with "8". It seems like "8" in the beginning of a string is a reser...
Kisser asked 27/4, 2010 at 9:26

1

Solved

If I set the CurrentCulture of a thread pool thread, what happens when the thread finishes execution and gets returned back to the thread pool? Does it get its CurrentCulture reset back to the defa...
Encephalon asked 23/9, 2009 at 16:35

3

Solved

I almost have the same problem as the guy in this thread: Convert Float that has period instead of comma? So that my double x = 234.4; string y = x.ToString(); I get y == "234,4"; Even worse ...
Coverture asked 6/2, 2009 at 0:27
1

© 2022 - 2024 — McMap. All rights reserved.