Questions tagged [cultureinfo]

Represents information about a specific culture including the names of the culture, the writing system, and the calendar used, as well as access to culture-specific objects that provide information for common operations, such as formatting dates and sorting strings.

Represents information about a specific culture including the names of the culture, the writing system, and the calendar used, as well as access to culture-specific objects that provide information for common operations, such as formatting dates and sorting strings.

Reference

CultureInfo on MSDN

1135 questions
-1
votes
1 answer

How to get Complete DateTime in a given culture for Console Application

My requirement is to get DateTime in given locale and I am trying to achieve this by using below code var d1 = DateTime.Now; CultureInfo culture = new CultureInfo("en-NZ"); var da = d1.ToString("d1", culture); Console.WriteLine("Output" +…
-1
votes
1 answer

DefaultThreadCurrentUICulture in .Net 4.0

hi i have a code that writed in .Net 4.5 CultureInfo.DefaultThreadCurrentUICulture = value; now i need to use this code in .net 4.0 but it seems This code is not available in .NET 4.0 What is the same code in .NET 4.0? I'm new, please help
davod kh
  • 23
  • 4
-1
votes
1 answer

How to identify whether ListSeparator is modified or not?

I'm having WF application and trying to serialize/deserialize its data based on different cases (like in CurrentCulture and InvariantCulture). I'm facing problem when change the CurrentCulture.TextInfo.ListSeparator before serialization /…
Prithiv
  • 504
  • 5
  • 20
-1
votes
1 answer

Setting CurrentCulture AND CurrentUICulture in WPF

first off, I'm aware of the general solution to the WPF culture problem: Setting Culture (en-IN) Globally in WPF App My question is as follows: I have an IValueConverter for decimal numbers and dates and for them I get the correct CultureInfo in the…
Dee J. Doena
  • 1,631
  • 3
  • 16
  • 26
-1
votes
1 answer

How to use custom CultureInfo in NUnit?

I want tests to use custom CultureInfo. I created my CultureInfo and set this to TestExecutionContext.CurrentContext.CurrentCulture property. But it doesn't work. Tests are still using default culture. [OneTimeSetUp] public async Task OneTimeSetUp()…
Denis535
  • 3,407
  • 4
  • 25
  • 36
-1
votes
1 answer

Changing windows culture programmatically in C#

I want to change the windows culture settings programmatically since when using my program I need to parse the dot "." as the decimal number and windows has by default set the ",". So I'm looking for this. I already tried by changing the current app…
Delynith
  • 114
  • 8
-1
votes
1 answer

using a decimal separator different from my actually culture info

I was assigned a bug that keeping the culture of windows 10 on Italian and changing from the control panel the decimal separator could not on our website to display the numbers with it. is there any way to tell devextreme, keeping the translation of…
-1
votes
1 answer

Displaying negative values in a DataGridView without parentheses

I have a DataGridView object on my form that is linked to a dataTable populated based on a variable SQL query. My problem comes with the way that negative values are displayed with the .DefaultCellStyle.Format value set to "c" for currency. For…
user2757352
-1
votes
1 answer

Get the culture info based on ID of language

I have the following code that generates an invoice line and includes the month a company has used it's coupons: invoice.InvoiceLine += CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(month.Month) + " (" + usedThisMonth + "), "; My problem…
user3127554
  • 521
  • 1
  • 7
  • 28
-1
votes
1 answer

CultureInfo not changing at design time

I have used resource files for localization in design time support. The localized string will be retrieved for designer action items to be added in designer of a control. Here is the code which i used to get the current culture from the resource…
Amal
  • 576
  • 1
  • 6
  • 26
-1
votes
3 answers

C# ASP.NET: can't convert datetime to string

I want to convert a datetime to string. But result now is returned as 04 August, 0016 which is not what I need. I want result to be 04 August, 2016. C# code: DataTable dtGroupCurr = new DataTable(); dtGroupCurr = sourceGroupCurr.Tables[0]; var…
nettoon493
  • 17,733
  • 7
  • 30
  • 45
-1
votes
1 answer

set CultureInfo to a language with country unknown

I'm trying to set the CultureInfo of my application depending on a settingFile that's being given to me (I can't change it's content). In my settingFile I have only access to the language name that I should display (no information about the country)…
Belterius
  • 738
  • 1
  • 10
  • 20
-1
votes
1 answer

Culture NumberFormat change and thousand/hundred separator positioning

I am using Crystal Report 13 with Visual Studio 2013. I want my numeric field type as 22,33,45,405.33 instead of 223,345,405.33. My question is that if I add NumberGroupSizes(int[]{3,2,2,2,2,2,2}) of NumberFormatInfo and set it to current culture,…
user3352074
  • 145
  • 3
  • 14
-1
votes
1 answer

DateTime.Now causing trouble when website uploaded on different server

My web site is in .net mvc. I have saved dates from client side using jQuery calendar into database MS SQL. Also I have saved dates using DateTime.Now. The problem is that the application is hosted on server which is in America, but my client is in…
-1
votes
1 answer

Get week number for the given date c#

I have tried searching for a solution which gives the correct week number for the date value. link1, link2,link3 Followed the methods in the above links, but for the date 30/12/2014, I get the week number as 53. but it falls as 1st week of 2015…
kk1076
  • 1,740
  • 13
  • 45
  • 76