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
2 answers

What is the standard way to name a file based on CultureInfo?

Looking a recommendation for my criteria. I need to create a file for different countries and looking at the best naming strategy for this. I am working with .net 4.5. So example I need to create a file with Russian data, should it be…
amateur
  • 43,371
  • 65
  • 192
  • 320
0
votes
1 answer

TextBox.Text = floatValue.ToString messes with separator symbol

When a float value is assigned to a textBox.Text via floatVal.ToString() method, it makes local culture separator a , How do I prevent this from happening?
user1306322
  • 8,561
  • 18
  • 61
  • 122
0
votes
1 answer

What is the string representation of the IEEE 1xxx floating point format, and how do I output it?

I am trying to output flouting point numbers from c# in the format used by VRML 2.0. According to the vrml spec, this is double-precision floating point number in IEEE 1xxx floating point format (see 2.[IEEE]). [IEEE]: ISO/IEC 9899:1990…
HugoRune
  • 13,157
  • 7
  • 69
  • 144
0
votes
2 answers

WINRT TextBox Number Formatting not respecting Current Culture

I am binding a float property to my TextBox control. Thats working correct if I am using "en" as my language Preference. Entering a number "1.123" is correctly parsed. If I Switch mur culture to "de" nothing changes in the TextBox (and TextBlocks).…
Obiwan007
  • 646
  • 1
  • 8
  • 20
0
votes
2 answers

Always returns the string with the default language from a resource file

I have two resources files, Emails.es.resx (es-ES) and Emails.eu.resx (eu-ES), and I have a problem to retrieve a string from eu-ES file with myLib.Emails.ResourceManager.GetString("textKey", "eu-ES"); At local this works properly but at server, is…
0
votes
1 answer

C# set language of any control in a web page by a dropdownlist

i have a web form and i want to change its titles for each control with the language thats chosen by a dropdown. but i couldnt do it. I messed with json and complicated things. here what i tried: controller string newstr = db.Countries.Where(c =>…
Berker Yüceer
  • 7,026
  • 18
  • 68
  • 102
0
votes
3 answers

Datetime.ParseExact throws an error on server but works on client

I am getting an error 'String was not recognized as a valid DateTime.' by using the following code. NewRow["ExpiryDate"] = DateTime.ParseExact(SelectedRow.Cells[9].Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); where…
Microsoft Developer
  • 5,229
  • 22
  • 93
  • 142
0
votes
3 answers

Converting date and time based on culture info on WP7

I'm trying to format the date and time on my app based on the users set culture info, however, every help resource I see keeps suggesting that I have to manually enter each culture locale in code. For example, if I wanted en-UK I would have to…
Euthyphro
  • 700
  • 1
  • 9
  • 26
0
votes
3 answers

new CultureInfo(string Name) constructor - .NET (C#)

I have a situation where I save a string representation of dates/numbers etc in the DB, and since the application is run in multiple countries and sometimes with users in different countries using the same DB, I store the CurrentCulture.Name in the…
Madeleine
  • 2,152
  • 2
  • 24
  • 35
0
votes
1 answer

overiding NumberFormat in .net application cultureInfo

I have a .NET application available in several different language. i basically load and save file (containing doubles) in the System Culture but i would like to force numbers to always be displayed and entered using the US culture format (comma as…
ak3nat0n
  • 6,060
  • 6
  • 36
  • 59
0
votes
4 answers

WPF Design Time Application Culture

We are developing a localized English/Arabic application, and I need to set the System.Threading.Thread.CurrentThread.CurrentUiCulture to either of both cultures during design time to a different value than the value set at run time. How can I…
Mohammed A. Fadil
  • 9,205
  • 7
  • 50
  • 67
0
votes
1 answer

Can i change the default satellite assmbly folder structure?

from http://msdn.microsoft.com/en-us/library/sb6a8618(v=vs.80).aspx It seems like i need to have culture folder under the main executing assembly folder for example it will be "myprogram/de/", "myprogram/en/" however, i'm wondering if i could do…
BkkGun
  • 3
  • 1
0
votes
2 answers

Parsing Greek decimal numbers

I have the following piece of code: decimal kwh = decimal.Parse(textBox1.Text, NumberStyles.AllowDecimalPoint, NumberFormatInfo.CurrentInfo); decimal sale_price =…
George Georgiou
  • 455
  • 2
  • 14
  • 27
-1
votes
1 answer

Make Datetimepicker independent from system date

I am using windows 10 and Hijri calendar and I want my datetimepicker shows gregorian calendar instead of Hijri. Using WinForms .NET 4.8 I changed culturalInfo to "en-US" or InvariantCulture but still it wont change I tested these codes: …
-1
votes
1 answer

Localization does not work on some projects

I am trying to make my project multilingual. To do this, I created resource files for English and for other languages, for example: langu.resx langu.uk-UA.resx In some of my projects, everything works fine. But some projects don't want to change the…
Andrii
  • 11
  • 2