cultureinfo Questions

4

Solved

I've an application written in C# which has no GUI or UI, but instead writes files that are parsed by another application (in XML and others). I have a customer whose CultureInfo has the NumberDec...
Galliwasp asked 10/2, 2010 at 4:52

3

Solved

This line of code: DateTime dt = DateTime.ParseExact(time, "hh:mm", CultureInfo.InvariantCulture); parses a "time" value of "12:45" just fine, but throws an exception of "13:00" Should I be usi...
Fenton asked 27/6, 2012 at 18:5

2

Solved

I'm searching for a strategy with which I can set the default sortorder of String.CompareTo to bytewise - ordinal. I need to do this without having to specify the sortorder in the call to the metho...
Woke asked 21/6, 2012 at 12:40

2

Solved

Is it inappropriate to use InvariantCulture? And, if used, would it affect any global settings? Dim hh As Decimal = 123456789.123456 ' Is this an appropriate usage? Dim ll As String = hh.ToString...
Livvie asked 26/6, 2012 at 18:29

3

Solved

I'm reading encrypted credentials/connection strings from a config file. Resharper tells me, "String.IndexOf(string) is culture-specific here" on this line: if (line.Contains("host=")) { _host = ...

3

Solved

Looking at DateTime.TryParseExact(dateString, "M/d/yyyy hh:mm:ss tt", CultureInfo.InvariantCulture, 0, out dateValue) I supplied the exact structure to look for : M/d/yyyy hh:mm:ss tt Questio...
Oscillator asked 2/4, 2012 at 14:34

1

I'm currently going through the globalization process for a project (a .net mvc2 app), and globalization is a bit new to me. I've noticed that DateTime.ToString(), when formatted for some cultures,...
Thistledown asked 7/12, 2011 at 2:9

2

Solved

I am using MVC3, and have some logic for changing the culture which all works fine. My issue, is that there seems a few places where this change should be made, and I am unsure where would be the b...
Enter asked 22/2, 2012 at 14:34

3

Solved

I have List like this List<string> items = new List<string>(); items.Add("-"); items.Add("."); items.Add("a-"); items.Add("a."); items.Add("a-a"); items.Add("a.a"); items.Sort...
Birdwatcher asked 20/2, 2012 at 0:58

2

Solved

I have string "Ärger,-Ökonom-i-Übermut-ẞ-ß" and when I run IndexOf("--") I get a result of 23. If I use Replace on same string nothing gets replaced. I don't understand what is happening, so can s...
Dorcus asked 13/2, 2012 at 12:40

7

Solved

Assume that I only have a country code (en, de, fr) and I need to display the weekdays in this language. I know about RegionInfo and CultureInfo - but I can't find a solution. If I create a country...
Godred asked 23/3, 2010 at 14:12

4

Solved

I have a property: public decimal? DejanskaKolicina { get; set; } and Resharper shows me: specify a culture in string conversion explicitly But if I use: DejanskaKolicina.ToString(CultureI...
Mcabee asked 30/1, 2012 at 6:44

4

It is not possible to set an entire .net application to another culture other than the user profile-culture in .net. The appropriate way to control cultureinfo seems to be using the dedicated metho...

1

Solved

Why does: decimal.Parse("1,2,3,45", CultureInfo.InvariantCulture) return a decimal of 12345, yet: int.Parse("1,2,3,45", CultureInfo.InvariantCulture) throws an exception? I would expect the c...
Bomb asked 29/11, 2011 at 13:24

3

I have client that wants to specifiy their own version of localized content for a subset of my string resources. For simplicity here is basic example: Lets say I have 2 localized strings (showing ...
Jurisdiction asked 8/10, 2010 at 20:39

4

Solved

Is there a way to keep the culture specific date time formatting but force 12/24 hour rendering? I know I can do a lot with the actual date/time format string like HH:mm:ss and hh:mm:ss but I would...
Tocology asked 10/11, 2011 at 21:54

4

Solved

According to Wikipedia (and confirmed in an answer by Dario Solera), in Italy they format times using colons: The 24-hour notation is used in writing with a colon as a separator. Example: 14:05...
Shiner asked 21/9, 2011 at 10:9

8

Solved

My application is currently displaying negative numbers as -1. The users have changed the requirements (just for a change!) and now we will have to display the numbers as (1). Can I enable that for...
Swap asked 7/1, 2009 at 1:6

2

Solved

When I try the below code, I get the output 2 084 001. What could be wrong here? Isn't my format string supposed to override the current culture settings? decimal v = 2084000.7621m; System.Console...
Bewail asked 26/8, 2011 at 8:46

2

Solved

Why is the culture name for English (Caribbean) "en-029"? I know "en-CA" is used for English (Canada), but why 029? What does it signify? Why was it chosen?
Alcyone asked 25/8, 2011 at 14:45

2

I would like to dynamically set the culture format of the Number textblock with culture and number values passed through to MyUserControl. The MyCulture and Number values are passed to MyCustomCont...
Spermogonium asked 22/8, 2011 at 19:30

3

Solved

I created a value converter in my Windows Phone 7 ... public class MyConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.Cult...
Foretaste asked 16/8, 2011 at 15:13

2

Is it possible to determine if the CultureInfo instance that I am working with is based on a Latin character set or not?
Referendum asked 25/5, 2011 at 15:51

3

Solved

I want to convert a numeric value to a string, displaying culture-specific digits. For example, the Dari language used in Afghanistan (culture name "prs-AF") uses Eastern-Arabic numerals instead of...
Vestavestal asked 4/6, 2011 at 22:17

2

Solved

What's wrong with this code? Error(Exception) message : Not a valid calendar for the given culture. System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("fa-Ir"); //Erro...
Tripping asked 27/3, 2011 at 12:3

© 2022 - 2024 — McMap. All rights reserved.