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

Formatting DataGridView Column using CultureInfo?

I'm using vb.net 2015 (framework 4.5.2). I want to format a column as currency using CultureInfo since the currency is not static and couold be different from all other places in the program that I use currency. So the default will not work. I tried…
zumi
  • 1
0
votes
2 answers

How can I detect french or us culture from string decimal format?

I have two string : 1.5 and 1,5 I want to convert this to decimal but I want to detect automatically the culture : with point us culture and with comma fr culture What is the best way to do this ?
user7128918
0
votes
2 answers

Convert UNIX Epoch to Datetime depending on culture

I'm developing a method that will receive UNIX timestamp and culture: public DateTime unixEpochToDateTime(long unixTimeStamp, string culture) { ... } Call example: DateTime t = unixEpochToDateTime(1478181983, "es-ES"); I need convert this UTC…
user3564367
0
votes
1 answer

How to sort dropdownlist Currency List item that not related with database?

How to acecending sort the dropdownlist in currency list. Is need to datatable/dataview? For Each cultureInfo__1 As CultureInfo In CultureInfo.GetCultures(CultureTypes.SpecificCultures) Dim regionInfo As New…
Bcktr
  • 208
  • 1
  • 8
  • 22
0
votes
0 answers

How to validate is LCID proper?

I need to check that I get the int value which is the valid LCID of CultureInfo. Unfortunately, CultureInfo doesn't contain something like bool TryGetCultureInfo(int, out CultureInfo) method. Also I see that some CultureInfo items have the same…
Andrey Bushman
  • 11,712
  • 17
  • 87
  • 182
0
votes
2 answers

.NET application language not being set/detected correctly

I have an application written in C# that I have translated in several different languages. Up until now, it has been correctly detecting the language from the Operating System's UI Culture and displaying all menus (etc) in that language. Recently,…
Simple Guy
  • 568
  • 5
  • 21
0
votes
1 answer

Culture Resource Manager

Problem I am trying to implement a system in my program to switch language. I found out that i can use CultureInfo and ResourceManager to achieve that. I built up this code after a couple of hours having problem with the resource not found, finally…
LifeRewind
  • 19
  • 6
0
votes
0 answers

How use culture in WCF which is set by user in codebehind of ASP.NET

how is possible change culture info in asp.net web forms code behind and next get this value in wcf? In code behind I'm using this: Thread.CurrentThread.CurrentCulture = new CultureInfo("pl-PL"); And for getting value in wcf…
Denis Stephanov
  • 4,563
  • 24
  • 78
  • 174
0
votes
0 answers

different Computer, different CultureInfo - Problems with datetime format "latvian"

it is a web page (Asp.Net MVC), multi-language including english, latvian, lithuvian, russian, polonia. For selecting a date we choose the jQuery-Ui-datepicker including extra localization files for each language. (Date is given as string: …
0
votes
1 answer

string not recognized valid date time

input value ="3:10 PM" or "15:10" depend on regional settings in control panel. when set to India input value is "15:10" and when set to US input value is "3:10 PM". I have to convert input value to "1899-12-30 15:10:00.000" every time for that…
ND's
  • 2,155
  • 6
  • 38
  • 59
0
votes
2 answers

DateTime.TryParse fails at yyyy only

I have a filter field that allows to search by partial or full date that can be entered in different formats - that is, whichever way the user wants to enter it, so TryParseExact doesn't look like the best option. The problem is that the following…
Darth Veyda
  • 828
  • 2
  • 12
  • 23
0
votes
1 answer

Formatting a number in c#

I want to seperate a number with commas. I have tried many ways to do it. But didn't work. Its already converted to a string and now i want to format the "tot". GetData getData = new GetData(); string tot =…
Mike
  • 1,017
  • 4
  • 19
  • 34
0
votes
3 answers

Cultureinfo mismatch caused Excel Automation to fail

I am using interop to open Excel files in C#. The current problem I have is that, if the Excel I installed is English, for the opening to work, I have to set LocalSettings to English. It will fail these two do not match. I found that this is an…
Thomas
  • 53
  • 1
  • 5
0
votes
1 answer

MVC Globalization Culture Decimal Number Format using OPEN XML

Good day, I have a MVC application that uploads an excel file using Open XML. The file has deciml values that I pass back to teh view, however when I deply the applciation to teh server it returns the values with proceeding decimal places, for…
Papi
  • 555
  • 13
  • 40
0
votes
2 answers

How to change the Numeric seperator in DataGrid?

I have an query with number format.When changed the decimal separator(.) ---> (,) by using Region settings, type the (1.5) in excel sheet it will changed as (1,5) correctly. My problem is in DataGridView control, I followed the same procedure in…
Prithiv
  • 504
  • 5
  • 20