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)

781 questions
-1
votes
2 answers

Given Country - How to get every Displayname from CultureInfo programmatically?

i need to find a solution to get the native spelling of the countryname in every Culture. For example: Germany, ISOCODE: DE On german Windows-Systems there are the following informations: Englishname : Germany Nativename : Deutschland Displayname…
-1
votes
1 answer

How to apply Culture on property level like DataAnotation in MVC not global level

I only need to apply Culture on single TextBox control in its DataAnotation attribute, not for whole model Languages https://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx In MVC5…
zubair Ahmad
  • 113
  • 3
  • 10
-1
votes
1 answer

How to get Windows region format?

In the control panel of Windows there is a combobox where we can change the regional format (controlPanel => Region => Formats (windows 10)). For example Persian or English I want to retrieve this regional setting in my application. I tried code…
M. G. Lee
  • 153
  • 1
  • 10
-1
votes
2 answers

How to convert string “2.000,65” into decimal 2,000.65 (en-Us) culture in c#

I have string value of "2.000,65" in German (de-DE) culture format. I want to convert this value into decimal and that too also in English (ed-US) format in c#, like "2,000.65". Summary:- I have a string value : "2.000,65" Now wanted to convert this…
Herin
  • 664
  • 2
  • 17
  • 33
-1
votes
1 answer

DateTime.Now causing trouble when website uploaded on different server

My web site is in .net mvc. I have saved dates from client side using jQuery calendar into database MS SQL. Also I have saved dates using DateTime.Now. The problem is that the application is hosted on server which is in America, but my client is in…
-1
votes
1 answer

Forcing in culture 24h and 12h time format

As in title. I tried this: CultureInfo ti = CultureInfo.CurrentCulture; if (SettingsApp[0].TimeFormat == 0) { ti.DateTimeFormat.ShortTimePattern = "HH:mm"; } else { ti.DateTimeFormat.ShortTimePattern = "hh:mm…
GoOx
  • 73
  • 1
  • 1
  • 9
-1
votes
1 answer

Have Win8 and Win7 different CultureInfo on the same culture? (different dateSeparator)

I'm moving all my info and projects from Win7 to Win8 when suddenly an unexpected error appears with the datepicker Uncaught Unexpected literal at position 2. I set the CurrentCulture to es-VE like…
Luis
  • 5,400
  • 8
  • 38
  • 60
-1
votes
1 answer

How to change individual keyboard layouts using C#

I am developing a multi-lingual application allowing users to change language as well as keyboard layouts (through combobox). I am able to change the culture of application successfully but I'm unable to change the individual keyboard layouts e.g.…
Ali Agha
  • 19
  • 1
  • 5
-1
votes
1 answer

How to get 'Desktop' and 'Program Files' Name in current culture

I need to display the 'program files' and 'Desktop' path on a spanish PC. I am trying Environment.SpecialFolder.Desktop; Which is returning the text 'Desktop'. How do i get spanish text 'Escritorio' for desktop?
Gaddigesh
  • 1,793
  • 8
  • 27
  • 41
-1
votes
1 answer

What is the BEST and OPTIMIZED way to have a multiple language website?

I want to know is it better to use from google translate API or to have a url like this: /example.com/en/page/show and generate the views with the language mentioned in the url with lots of if's? Or what eles? Thanks.
Hamid Reza
  • 2,859
  • 9
  • 44
  • 71
-2
votes
1 answer

Convert month name from one language to another without knowing the Culture?

How can I convert a string with a month name like "agosto" to the english translation "August" without knowing if "agosto" is spanish or italian? I know that I get the month name for the month number 8 in Spanish with Dim SpanishMonthName as String…
PeterCo
  • 777
  • 1
  • 16
  • 30
-2
votes
1 answer

CultureInfo name for each country

I have country list with two letter code like 'US' and and three letter code like 'USA'. I just want to assign all 239 countries have the locale code like en-US (not es-US). I tried the iterate on: CultureInfo[] cultures =…
asdf_enel_hak
  • 7,114
  • 3
  • 36
  • 77
-2
votes
2 answers

c#.net String To Date Time

suppose i have a string date = "30-10-2018 15:00:00" how can i save it a datetime variable depending on pc region and time settings This is what I got so far: DateTime evtd; try { switch (cmbDateType.SelectedIndex) { case 1: …
sushil.agarwal
  • 121
  • 1
  • 6
-2
votes
1 answer

Updating culture short time pattern format not getting in DateTime.now

System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern="DD/MM/YYYY"; System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortTimePattern ="hh:mm tt"; I am overriding the Date and time format for a…
-2
votes
3 answers

How get full short date by culture

this code return to me 'M/d/yyyy' but I need 'mm/dd/yyyy' how do this? ((CultureInfo)Session["culture"]).DateTimeFormat.ShortDatePattern)
Mediator
  • 13,836
  • 33
  • 104
  • 177
1 2 3
52
53