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
0
votes
1 answer

Converting character code to character C# using CultureInfo

I'm using Arabic CultureInfo in a C# project. At one place I'm converting the character code to character using Strings.Chr(chrCode) if the language which I select is English it is working fine, other than English it is returning some special…
0
votes
1 answer

Where should I change/set culture info settings in my WPF app and why? (Must works on all .NET frameworks 4.0 and newer)

I'm trying to set up an a culture info for my WPF application and I've found several examples, like: CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("en-US"); CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo("en-US"); And…
billy_56
  • 649
  • 3
  • 11
  • 27
0
votes
2 answers

C# Check if string is in a value format

I'm wondering if there's simple way to check if a string is in a value format of any kind. Meaning the number one-thousand could be represented in any of the following ways: 1000 1000.00 1,000 1,000.00 $1,000.00 I've tried double.TryParse(value,…
Joe Higley
  • 1,762
  • 3
  • 20
  • 33
0
votes
1 answer

Input tag ,CultureInfo and Html (French vs English)

My question is for input tags and when the type is a number Say I had a number French English Notice how the page in french will not render the input tag because it the type is…
Yusuf Jama
  • 123
  • 13
0
votes
0 answers

C# Windows Service not using Regional Settings info

I have a .exe file which will generate date in MM/DD/YY if I set short date format in Regional Settings as DD/MM/YY. So when I execute the .exe manually, I get correct output. But when I use C# Windows Service ( running as Local System), the .exe…
Rauf
  • 12,326
  • 20
  • 77
  • 126
0
votes
2 answers

VSTS test deployment and invalid assembly culture

I have a DLL that I'm testing, which links to a DLL that has what I think is an invalid value for AssemblyCulture. The value is "Neutral" (notice the upper-case "N"), whereas the DLL I'm testing, and every other DLL in my project, has a value of…
Merlyn Morgan-Graham
  • 58,163
  • 16
  • 128
  • 183
0
votes
1 answer

CultureInfo. Number & Date European format with English Language support?

I would like to support English language for European formatted culture. Dates should be displayed in English using European format. So, "14:00 Sunday, 16/July/2017" should be displayed and not the British way... Actually Irish culture is OK for…
user6071805
0
votes
1 answer

When settting the CultureInfo error is returned

I am developing a SharePoint Online add-in in ASP.NET MVC 5. I have three resource files with three languages that I want CultureInfo to read when the corresponding language code is returned from Shareoint. This is my code: In the ActionResult…
AllramEst
  • 1,319
  • 4
  • 23
  • 47
0
votes
1 answer

Format date time string in c# same way Moment.js formats local time

In my application users can select a culture in their profile, for this example I am testing with the Japanese ("ja") culture. I use moment.js to generate date time string on the client side but, there are other palces where I generate the date time…
user2945722
  • 1,293
  • 1
  • 16
  • 35
0
votes
0 answers

How to get CultureInfo.DisplayName based on a culture other than my own?

Given a list of cultures, I want to retrieve their display names based on a culture other than my own. Using "en", "de" and "fr" querying CultureInfo for them on my machine (US version of Windows 10 set to culture "en-ZA") gives the following…
Steve Crane
  • 4,340
  • 5
  • 40
  • 63
0
votes
2 answers

CultureInfo and Double.parse and double.toString not worked correctly

How can I force c# application to use . for decimal separator and ignore culture settings in server. I have this problem with double.ToString and double.parse I should change setting in application level because of large scale of…
Hamed Mahdizadeh
  • 936
  • 1
  • 15
  • 29
0
votes
2 answers

How to set Million separator (') and thousand (.) using cultureinfo in C#

I'm trying to convert a value 9.999.999 to 9'999.999 using cultureinfo in C# but I can't get it works. How can I do that?
David López
  • 366
  • 3
  • 12
0
votes
1 answer

.NET: DateTime settings are different on one machine

I have two applications (web site and desktop application) launched on the one machine, both uses the following to serialize DateTime object value: string strDateTileFullFormat = Thread.CurrentThread.CurrentCulture …
Budda
  • 18,015
  • 33
  • 124
  • 206
0
votes
2 answers

Managing date in multiple culture language (C#)

I'm parsing multiple RSS feed and I need to get 'pubdate' from item, but for some of these dates I get format in different language, so my code fails if format language is not english. with these kind of that of course it works:enter code here Sun,…
Noomak
  • 371
  • 5
  • 19
0
votes
1 answer

MSSQL Characters not appearing

So, I'm storing Norweigan characters in an MSSQL table, using nvarchar. One some pages when I pull these back out in ASP, they display fine... 5 tips som kan hjelpe deg med måltidsplanlegging But on other pages it's displaying as... 5 tips som kan…