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
2 answers

How to create a multilingual project

I'm new to VB.net and I'm trying to do a simple multilingual project. So far I've created 2 resource files: en-US.resx pt-PT.resx in both of them I have the same ID's and diferent values (strings only) (these strings will be used across…
RagnaRock
  • 2,432
  • 7
  • 34
  • 56
0
votes
1 answer

Should I use Current Culture for this

In my application, some text the user typed in a .txt file is compared with file names and running process names on the users computer. Should I use Current Culture comparison for such, or is Ordinal comparison fine. If it matters at all, I'm using…
JackBarn
  • 635
  • 1
  • 6
  • 18
0
votes
1 answer

getting the CultureInfo from the existing ResourceSet

I have a ResourceSet which I use in my code. Everything works ok, but because some of my users use RTL I need to know which ResourceSet is the active one. I would sure be happy if after this code: CultureInfo ci =…
Bergkamp
  • 599
  • 2
  • 6
  • 22
0
votes
1 answer

ASP.NET webcontrols render wrong in different culture settings

I have a self defined web control. Some code in a loop: double cellHeight = 12.34; Label dcell = new Label(); dcell.Style["height"] = cellHeight + "pt"; dcell.Text = cellHeight; If I use…
0
votes
2 answers

Convert string to decimal in C# not working

I need to convert a string to decimal. And I'm baffled why it is not working public ActionResult Test(){ decimal result; bool o = decimal.TryParse("-2,366.15", out result);//false //decimal c =…
Vincent
  • 931
  • 7
  • 20
0
votes
1 answer

Difficulties with CultureInfo and representation in Listbox

I'm trying to represent the right double value in my Listbox. The values in my SQL Database are represented as "0,09" for example. Now I put these values which are in a certain column into a Listbox with a "SELECT DISTINCT" statement. When searching…
MKX2015
  • 155
  • 1
  • 2
  • 13
0
votes
1 answer

Convert DateTime with a specified language

I am coding a MVC 5 internet application and am wanting to convert a DateTime to be displayed as a LocalTime where I have the language. This is for an Azure website. Here is my code: DateTime dateTimeUtcNow = DateTime.UtcNow; DateTime convertedDate…
Simon
  • 7,991
  • 21
  • 83
  • 163
0
votes
1 answer

Display current datetime depending on client

I am currently saving the datetime.utcnow in the database on azure but im not sure how to display the correct time depending on the client. Should I be using utc? Should I save the timezone so I can recalculate the time? Can I use the culture to…
imGreg
  • 900
  • 9
  • 24
0
votes
0 answers

Get CultureInfo used in Windows Clock

I am trying to find a way to get CultureInfo of that is used by the operating system - Windows - for the clock. My system is en-US, but my calendar uses de-DE formats, but when I check the following properties, all of them show me…
blfuentes
  • 2,731
  • 5
  • 44
  • 72
0
votes
2 answers

save comma separated number in databse decimal type

We have large MVC(5.0) application in which we were saving lots of decimal data in database. There are currency and decimal inputs from UI. Now a new change request came to show all numeric values in comma separated numbers in UI and forms. We have…
sarojanand
  • 607
  • 1
  • 11
  • 30
0
votes
3 answers

Converting numbers to a single format in C#

I have the following case, from the client side I am getting a double value in a string, this can either be in 'en-GB' format or 'de' format, i.e 123.10 or 123,10. However I need to convert both these number to 123.10. i.e I tried writing the…
user1950055
  • 157
  • 1
  • 10
0
votes
1 answer

ASP.NET CalendarExtender Change culture in an Ajax Panel without refreshing page?

I have an ASP.NET page that utilizes an ASP.NET CalenderExtender inside an Ajax UpdatePanel. A user can choose from several different languages. I need the Calendar to change with the updated Culture info without the entire page refreshing. The…
barna10
  • 177
  • 1
  • 9
0
votes
1 answer

How to change double format of current culture asp.net

I have a web page with the next TextBox: and compareValidator to validate it:
0
votes
2 answers

cannot convert string to datetime using ParseExact

I have a string like this (in 12 hr clock) in my XML config data file: expires="10/27/2014 2:42:57 PM" I want to assign that value as a (datetime) member of a class like this: Common.SOExpiries = …
Our Man in Bananas
  • 5,809
  • 21
  • 91
  • 148
0
votes
1 answer

Storing CultureInfo value to Session format in WebServices

As the title says, im trying to create an CultureInfo object and save its value in a session. And using that saved CultureInfo object in my method for the returned value. But I get this error, and I cant find the solution! Please take a…