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

Converting DateTime from culture A to culture B

I need to convert DateTime variables between random cultures which will be read from config files. I have the following code which works but I don't know why, and I'm not sure I trust it across all cases because the DateTime.Parse has no parameter…
wesmantooth
  • 625
  • 2
  • 11
  • 29
0
votes
2 answers

Select language and change the CultureInfo in MVC / C#

I need a help to select language and change the CultureInfo dynamically after selecting the desired language. I have the files .resx , the view and the controller. But I use Tenant, so.. It is possible or recommended change the language in it? I…
0
votes
1 answer

cultureinfo for month and year only

I am getting date as string parameter that is ExpDate as 12/16(month/year), i need to convert it as DateTime and save it to the sql db, i convert the above string to date as paymentMethod.ExpirationDate = Convert.ToDateTime(ExpDate); this…
user4470962
0
votes
4 answers

DateTime.Parse not working on an MVC custom binder

I'm getting a DateTime from an implicit binding at an Action in a .NET MVC web application. The problem is that i'm getting the date in format "MM/dd/yyyy" while i'm sending it through a query string with Ajax in format "dd/MM/yyyy". I know this is…
MorgoZ
  • 2,012
  • 5
  • 27
  • 54
0
votes
1 answer

StreamReader Turkish Character Encoding

How can I fix this problem? string icerik; WebRequest istek = HttpWebRequest.Create(adres); istek.Proxy = null; WebResponse cevap = istek.GetResponse(); CultureInfo tr = new CultureInfo("tr-TR"); StreamReader gelenBilgi = new…
B. Ulaş Şenol
  • 91
  • 1
  • 2
  • 8
0
votes
0 answers

How can I handle two different languages simultaneously in a Speech-to-Text app (in C#)?

I would like to make a Speech-to-text-to-translation utility that can recognize and render both English and Spanish "on the fly." To start with, I need it to be able to process two languages (the translation piece of it I'll postpone until…
0
votes
1 answer

Applying CultureInfo.InvariantCulture to a string

Basically I am formatting a string so that it has a specific set of 0's and is done so like the following for any data type that is NOT already a string: string weight =…
Mark
  • 501
  • 2
  • 11
  • 28
0
votes
2 answers

Unable to read decimal numbers from XML

I have a problem, when I try to read XML file, which has decimal values, like 24.5478785 - it gives back error: There is error in XML document Can someone please advise, why is this happening? Decimal part in file looks like:…
JustinasT
  • 561
  • 1
  • 8
  • 27
0
votes
1 answer

System.Globalization CultureInfo CultureNotFoundException

I followed the numerous guides of how to add a custom culture and on ocal machine if worked perfectly. However, I got CultureNotFoundException on the CultureInfo constructor on a development server with error on the name. the nlp file was created…
0
votes
1 answer

odd results when comparing strings based on culture

is there a reason why : string s1 = "aéa"; string s2 = "aea"; string result = s1.Equals(s2, StringComparison.CurrentCultureIgnoreCase); result = s1.Equals(s2, StringComparison.InvariantCultureIgnoreCase); result = false in all cases although my…
A.D.
  • 1,062
  • 1
  • 13
  • 37
0
votes
0 answers

Culture name 'es-419' is not supported. (.NET 2.0)

We have an old .NET 2.0 website that threw a strange error today. When users try to access the website with their region settings set to Spanish (Latin America) the site crashes and displays following error: After doing some googling I found that…
Tonny
  • 109
  • 9
0
votes
1 answer

Thread.CurrentThread.CurrentUICulture doesn't return country correctly

I'm with a very strange problem. I am implementing localization on my project, but when I try to get the current locale Windows is running, it misses the country information. Here it is a sample code: using System; using…
0
votes
2 answers

Vb.Net not able to convert DateTime for March month alone for Italy Culture

We need to convert the system date to a appropriate format as per the specific culture. We observe a strange behavior where-in we're not able to convert the DateTime for March month alone for Italy culture. Try Dim dt As String =…
user3138788
  • 53
  • 1
  • 1
  • 7
0
votes
1 answer

VB.NET Formatting numbers according culture selected

I have a multilanguage vb.net app. I am trying to format a number (ULong) to display it according to current language currency group separator by doing this: value.ToString("0.##", CultureInfo.CurrentCulture) CultrueInfo.CurrentCulture can be…
Willy
  • 9,848
  • 22
  • 141
  • 284
0
votes
1 answer

Asp.net MVC 2 Localization Problem in dev

I work on a multi culture web project. I use Localize and Global Ressources(resx) as multilang technology. I work in team with 2 developer. How can we share .resx . When my teammate give me the 2 Files ( myfile.resx and myfile.Designer.cs) and I…
Jean-Francois
  • 1,899
  • 4
  • 35
  • 73