Questions tagged [culture]

Culture is the combination of language and peculiarities of geographical location (like en-UK, en-US, de-AT, de-DE, fr-BE)

Culture is the combination of language and peculiarities of geographical location (like en-GB, en-US, de-AT, de-DE, fr-BE)

815 questions
10
votes
2 answers

What is LCID 127?

In asp.net what is the culture represented by LCID 127? <%Response.Write(System.Globalization.CultureInfo.InvariantCulture.LCID)%> Output = 127.
digiguru
  • 12,724
  • 20
  • 61
  • 87
10
votes
2 answers

Can you get culture info string in javascript just like in .NET?

I need to get culture string from browser's language. I thought about getting it from javascript like this: var userLang = navigator.language || navigator.userLanguage; but it gives me only first part of culture info that i would get from…
Tomasz Sikora
  • 1,649
  • 3
  • 19
  • 30
10
votes
2 answers

Localized tables and Entity Framework

I have a scenario where I need to localized values of objects in my database. Let's say you have an application that can create animals, if the user is english the value of the "Name" property of an animal would be entered as "Cat" in the UI whereas…
Pyttroll
  • 861
  • 7
  • 6
9
votes
6 answers

How do I detect the user's locale to get the correct csv separator?

I have a simple data conversion tool and one of the outputs it can produce is a csv file. This works perfectly here in the UK but when I shipped it out to a German customer I had some issues. Specifally, they use a ',' to represent the decimal point…
Jon Cage
  • 36,366
  • 38
  • 137
  • 215
9
votes
2 answers

ASP.Net MVC3 Modify culture for date and decimal through or not Visual Studio?

I'm working on an MVC3 application with Razor. I'm having troubles using Dates and doubles on my views. Both my Windows and Visual Studio are English, but I want to customize the culture of my project in "it-IT". I found several articles how to…
stuzzo
  • 1,056
  • 1
  • 15
  • 36
9
votes
4 answers

Convert number into culture specific

I have a number like 202667.4. I want to convert this to number based on culture. For Ex: In "de"(German) the number should be in 202.667,40. Any help will be greatly appreciated. Thanks.
Manikandan Ram
  • 211
  • 1
  • 4
  • 12
9
votes
6 answers

How to solve this Exception "Culture is not Supported"?

When I upload my ASP.Net site on IIS in my server, It throws the following error Error Culture is not supported. Parameter name: name en-SA is an invalid culture identifier. Exception Details:…
mohamed hafil
  • 209
  • 2
  • 5
  • 11
9
votes
3 answers

When parsing datetime into month day with English culture, it is still parsed in Turkish language

Here is the code. I still get incorrect results string srRegisterDate = "25.07.2009 00:00:00" CultureInfo culture = new CultureInfo("en-US"); srRegisterDate = String.Format("{0:dddd, MMMM d, yyyy}", Convert.ToDateTime(srRegisterDate), culture); The…
Furkan Gözükara
  • 22,964
  • 77
  • 205
  • 342
9
votes
3 answers

What is a String Culture

Just trying to understand that - I have never used it before. How is a culture different to ToUpper() / ToLower()??
Jack Kada
  • 24,474
  • 29
  • 82
  • 106
9
votes
2 answers

Is it possible to make a date datatype accept 13 as a month and 30 for all months?

I am in Ethiopia and we have 13 months. 12 of them with 30 days each and 13th month with 5 or 6 days. I want to sort my data by date using the BindingSource sort method. But to do that, I need to set my date field a date data type. When I set the…
Ashenafi Semu
  • 149
  • 1
  • 1
  • 10
8
votes
2 answers

Binding en-GB dates in a HTTP GET

I'm having a nightmare of a time with Dates. Were based in the UK, so our date format is dd/MM/yyyy. This is what users will type into the form when they want a certain date. I have a form that accepts just such a property. It's obviously a DateTime…
Liam
  • 27,717
  • 28
  • 128
  • 190
8
votes
3 answers

C#: Unit Test to Differentiate CurrentCulture from InvariantCulture

I have a method which takes a StringComparison argument, and it really needs a unit test to prove it is performing the right comparison type. This is basically what I have so far. It differentiates Ordinal from the rest by comparing "oe" and "œ"…
drifter
  • 611
  • 5
  • 17
8
votes
3 answers

How do I render only some specific model-fields with an InvariantCulture, while the rest keeps using the users culture?

I have a couple of hidden inputs on an asp.net mvc view. Their values contain objects of type double. I want them to be rendered with the InvariantCulture as they are used to be fed to an api (google maps) on the client. As it is now, they get…
fretje
  • 8,322
  • 2
  • 49
  • 61
8
votes
0 answers

How to set the ConverterCulture at Xamarin Forms in XAML

I am using Xamarin Forms (XAML) at a project where I need to show a price. To show the correctly formatted price I am using StringFormat like:
Fruchtzwerg
  • 10,999
  • 12
  • 40
  • 49
8
votes
5 answers

Difference between dd-mm-yyyy and dd-mmm-yyyy

Is it ok to use dd-mm-yyyy or dd-mmm-yyyy for UK. I used dd-mmm-yyyy format in my web application for UK. Select CONVERT(varchar(11),ArrivalDate,106) But the PM asked me, Are you sure that this is the correct date format for UK ? I searched on…
Abdul
  • 2,002
  • 7
  • 31
  • 65