Questions tagged [regional-settings]

used for settings related to the cultural adaptation of displayed data (e.g. time and dates, numbers and currency)

Regional settings are any options, environment variables or other settings regarding the internationalization (i18n) and localization of a variety of cultural aspects in user interfaces and other output.

Regional settings encompass (but are not limited to):

  • actual user locale (including language, usually identified through IETF language tags)
  • a range of formatting preferences for dates and numbers:
  • localized folder names
  • translated UI element labels
193 questions
27
votes
7 answers

Make TryParse compatible with comma or dot decimal separator

The problem: Let's assume you are using a dot "." as a decimal separator in your regional setting and have coded a string with a comma. string str = "2,5"; What happens when you decimal.TryParse(str, out somevariable); it? somevariable will assume…
ng80092b
  • 621
  • 1
  • 9
  • 24
13
votes
1 answer

How can you properly support the iOS 12 hour / 24 hour time override in Date & Time settings for DateFormatters?

If your iOS device is set to use a region that defaults to 12 hour time (e.g. United States) and you have a DateFormatter set up like this: var dateFormatter: DateFormatter = { let formatter = DateFormatter() formatter.dateFormat = "h:mm a" …
shim
  • 9,289
  • 12
  • 69
  • 108
13
votes
1 answer

Different languages issue when inserting formula from VBA

do I understand correctly, that if I use a command like Set myRange.formula = “=ROW(mySheet!R12)” my macro will cause #NAME? error appear in cells if it is run on, say, Russian Excel. I mean that in this case the above formula should be hard-coded…
Edgar Navasardyan
  • 4,261
  • 8
  • 58
  • 121
12
votes
3 answers

Client's first day of the week

Is it possible to determine regional settings of the client's machine, using pure javascript? I need to get first day of the week. Is it Sunday or Monday.
iLemming
  • 34,477
  • 60
  • 195
  • 309
11
votes
10 answers

Split %date% in a batch file regardless of Regional Settings

Is there a way to split the %date% in a batch file (say, in 3 environment variables), but regardless of Regional Settings? Today's date would be 3/13/2013 for US, but with my Regional Settings it is 13.3.2013 - the delimiter is changed and the order…
sashoalm
  • 75,001
  • 122
  • 434
  • 781
8
votes
2 answers

Hot to get user’s regional settings for currency in JavaScript or jQuery?

I’m trying to format some numbers with jQuery. I would like to get the user’s regional settings for currency and number, in order to implement the correct format (obtain the decimal separator). Is it possible to retrieve these parameters with jQuery…
6
votes
1 answer

Report Builder 3.0: How to convert string representation of dates in mm/dd/yy format using CDate

I'm building a report using Report Builder 3.0. The source system I'm working with has strings representing dates in the format of mm/dd/yy, but I want to show this to the end users as dd-MMM-yy instead. Using CDate on the string will give me errors…
6
votes
1 answer

Parsing "12/25/35" to a date using InvariantCulture (2-digit year)

When I use the InvariantCulture to parse a string, with both: var christ1 = DateTime.Parse("12/25/35", CultureInfo.InvariantCulture); and: var christ2 = DateTime.ParseExact("12/25/35", "MM/dd/yy", CultureInfo.InvariantCulture); the result depends…
Jeppe Stig Nielsen
  • 60,409
  • 11
  • 110
  • 181
6
votes
1 answer

Using dateFormatter in another language

I'm running a piece of code that returns nil when running on an iPhone with a different language setting. An example in code looks like this: let dateFormatter = DateFormatter() dateFormatter.dateFormat = "MMM d, yyyy, h:mm a" let thisDate = "Mar…
Shane O'Seasnain
  • 3,534
  • 5
  • 24
  • 31
5
votes
1 answer

Changing regional setting with Powershell

I have tried to google this out but with no success. Is it possible to change the Decimal Separator to "." and Thousands Separator to "," in Powershell? EDIT: To be more precise, is it possible to change the system setting. As I would do manually…
Mario
  • 377
  • 5
  • 18
5
votes
1 answer

How to detect if CurrentCulture has been customised by the user?

I would like to know how I can determine whether the CultureInfo instance returned by CultureInfo.CurrentCulture has all it's default values or whether it has been customised by the user. I have done some testing using the following LINQPad snippet…
Steve Crane
  • 4,340
  • 5
  • 40
  • 63
5
votes
4 answers

Cross-regional decimal/double parsing

As a matter of fact, I have multiple systems that can generate numeric data and they are stored on some web server in text files. Some of the systems use decimal point as fraction separator, some of the systems use decimal comma as…
Daniel Mošmondor
  • 19,718
  • 12
  • 58
  • 99
5
votes
3 answers

Detect if the CSV separator is ";" or ","

Depending on the regional settings, the CSV separator (or the list separator) might be ; instead of ,, which, at least on Windows depends on the Regional Settings. Is there a cross-platform way to detect what the CSV separator is with Qt? If no…
sashoalm
  • 75,001
  • 122
  • 434
  • 781
4
votes
3 answers

Server set to en-GB in Regional settings but DateTime parsing as en-US

I am processing records by pushing each record through validation stages, then into a database. One of the validation steps requires checking if certain columns are dates. I did this using DateTime.TryParse(s, out DateTime) assuming that this would…
Program.X
  • 7,250
  • 12
  • 49
  • 83
4
votes
1 answer

Java doesn't recognize Unicode character in path on Windows 11

Java isn't able to recognize Unicode characters with the Beta: Use Unicode UTF-8 for worldwide language support option enabled. The path to my user folder is C:\Users\Otávio Augusto Silva, and the á character is causing some trouble for java. By…
1
2 3
12 13