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

WP7 DateTimeFormat null creating IndexOutOfRangeException on dates

I already posted a similar question but here I have a slightly different problem with it. Situation in WP7.1 app: CultureInfo = new CultureInfo("es"); If culture info is set to es (es-ES works fine but that cannot be the solution to hardcode that)…
frno
  • 1,064
  • 11
  • 24
1
vote
3 answers

how to prefix a culture string such as "en-gb" before the {controller} position in the url in asp.net mvc?

so basically I want to achieve a multi-lingual website with the following scenarios: Using ASP.NET MVC 3 most language are using resource files so they are using same views, however there are also many views that are country-specific (i.e. language…
Lida Weng
  • 476
  • 6
  • 20
0
votes
1 answer

Prism localization issue: correct number and datetime format is not used

I have an application written using Prism 4.0. It has lots of Views which have different controls which bind to ViewModel properties (I don't have Models in my app). Some of those controls visualize datetime and decimal values. In some places the…
Bogdan Verbenets
  • 25,686
  • 13
  • 66
  • 119
0
votes
1 answer

MVC3 Razor globilization, double client side validation

I am having some problems with "," in the client validation, ie. I am trying to validate a double number like 124,51 in "en-EN" culture this would be 124.51 I have tried to set the culture in the Application_Start() and other fixes without any luck,…
0
votes
1 answer

Dealing with Decimal Separator and different Culture Settings

In my .NET MAUI App, I have Entrys that should allow positive double values. Also, I allow to switch Languages. Currently, I only support English and German. Anyway, in English Culture Settings, „.“ is the decimal separator and in German it would be…
OXO
  • 391
  • 1
  • 8
0
votes
1 answer

NET 6 decimal default interpolation conversion

I have a NET6 microservice that interpolate decimal variables truncating the decimal portion when the decimal part is 0, so assuming that d is my decimal variable with value 5.0: $"My decimal is {d}" result converted as "My decimal is 5" The same…
Emanuele
  • 73
  • 3
  • 11
0
votes
1 answer

Does CultureInfo.CurrentCulture.Name always return the language code and country/region code separated by a hyphen?

Does CultureInfo.CurrentCulture.Name always return the language code and country/region code separated by a hyphen? I have been told that CultureInfo.CurrentCulture.Name can sometimes return just the two letter language code, but I have found no…
cpdev
  • 27
  • 4
0
votes
2 answers

Can't keep CultureInfo across pages on .Net Maui Blazor

Next sample page features a language selector, a label to display current language and a button to reload the page. The language selector is binded to a variable with a setter where I update all culture settings I can think of. The label…
Matias Masso
  • 1,670
  • 3
  • 18
  • 28
0
votes
1 answer

Set page culture through DropDown Menu and additionally by Query Parameter

I have a DropDown Menu "DDLanguage" where the user choses the Language for the application, and this ovveride methode thats sets the according Culture. So far so good. protected override void InitializeCulture() { String language =…
Barnabeck
  • 459
  • 1
  • 6
  • 26
0
votes
1 answer

Manually set Culture Info Year Time Pattern

I would like to ask if it is a good coding practice to manually set the YearMonthPattern of the CurrentCulture? My problem is I set the current culture to Invariant, and the YearMonthPattern changed. What I did is just added the code to set the…
KaeL
  • 3,639
  • 2
  • 28
  • 56
0
votes
1 answer

c# Language.resx doesn't work when I install my compiled application

I have an winform c# application that can change between multiple languages. When execute my application in visual studio the language changes well, but when I compile the application and install it in my computer it does nothing. This is my code to…
Napo
  • 533
  • 1
  • 5
  • 13
0
votes
0 answers

CultureInfo.CurrentCulture always return en-US when publish Asp.net core angular 9 application

I am using localization in my asp.net core angular 9 application. currently I am dealing with two languages (English, German). In controller class I am getting culture info by this globalization method. [HttpGet] …
0
votes
0 answers

Windows Service unable to set language using CurrentCulture

I have a two resource files in my windows service for the purpose of localization (English and French). These resource files contain messages that I want to show the user after the service completes its task. The language in which I want to show…
0
votes
0 answers

CurrentCulture different from CurrentUICulture - Issue with particular software - Windows Server 2012

I'm trying to remotely use a software called Sunetplus installed on a local machine from a Windows 2012 Server. I only have to run a line in the command prompt to do what I have to do (which is import new data in the software database). The command…
0
votes
1 answer

ASP.NET Core MVC, set thread culture does not have effect

I dealing with multilanguage site. I have a partial view where my approach is to set specific language to my website.
koviroli
  • 1,422
  • 1
  • 15
  • 27