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
1 answer

.resx file (culture-specific) with singleton pattern?

Honestly this is first time into resx files for me. I try to investigate what bad and good practice and finds that there exist as much ideas as lines for someone soon to translate. As whole I got into this idea, Create all…
Independent
  • 2,924
  • 7
  • 29
  • 45
0
votes
1 answer

CultureInfo.ClearCachedData is not working properly in .net 4.6 and older for WPF only

Consider the following simple WPF application: XAML (MainWindow): Codebehind: public MainWindow() { InitializeComponent(); …
taquion
  • 2,667
  • 2
  • 18
  • 29
0
votes
2 answers

Why won't C# decimal ToString request culture AND currency?

I can't find the option of, given a number and a currency, printing them to a string given a culture. The closest thing I've found is decimal.ToString("C", GIVEN_CULTURE), but this won't ask for the currency, and will assume I'm talking about the…
Roborowski
  • 11
  • 3
0
votes
1 answer

DefaultView.RowFilter throws Format Exception with different DateTime formats

I must have a culture which has date format like this dd.mm.yyyy , but when i forward it to row filter like this: myTable.DefaultView.RowFilter="opened_on=#"+datetimepicker1.value.ToShortDateString()+"#" It says that input string is not in valid…
mikisa
  • 3
  • 3
0
votes
1 answer

Set global cultureinfo for decimal values

How to set CultureInfo globally for all decimal values. Take one decimal value like 15.00 we may use DecimalValue.ToString("C", new CultureInfo("en-GB")) so that it will convert for that culture and output is €15.00 But the question is am I…
0
votes
1 answer

Multiple Currency symbols in numberformatinfo

While writing a piece of code, I came across where using Numberformatinfo, I had to write two currency symbols for a country at the same time. Taiwan, now uses TWD as their currency symbol along with 起. So they write their Currency as NTD 23,900 起.…
0
votes
1 answer

How to redirect Site for specific country users?

I have a same website in two different languages, with two different domains, one in English and other in Turkish. Whenever someone accesses my website (www.example.com) I want to redirect that user to www.example.tr if he is accessing that site…
user6650571
0
votes
1 answer

Input string was not in a correct format with SUM

I have a problem calculating from double to string when I have a sum of a list. When the language setting is changed, I've tried using InvariantCulture but I've not managed to get it to work. Does anyone have any tips on how to process this? Code…
Wookoai
  • 47
  • 1
  • 8
0
votes
0 answers

C# Localization - multiple resx files but only one working aside from default

I have a simple console application (.NET Framework 4.6.1) where I'm trying to use multiple resx files by changing cultureinfo. Here is my code: `static void Main( string[] args ) { //default Console.WriteLine(…
dobokocka
  • 31
  • 3
0
votes
2 answers

Convert System.Globalization.DateTimeFormatInfo short date format to Windows.Globalization.DateTimeFormatting.DateTimeFormatter

I am using a CalendarDatePicker control in UWP. The format of the date should be localized to the user's chosen culture, which is not necessarily the same as the OS language settings. I want the date format to appear the same as…
0
votes
3 answers

C# Changing CurrentCulture DateTimeFormat not working

I try to add to my ASP.NET Website new language support (English). But all my dateTime format changed from to when I change language to "en-EN". To solve it I write following code: CultureInfo cultureInfo = new…
Urma
  • 188
  • 3
  • 13
0
votes
1 answer

Why C# CultureInfo.CurrentCulture give en_US in Window-7 Japanese culture?

I have window-7 Ultimate OS.I written below code for get current culture info. void TestMessage() { CultureInfo culture = CultureInfo.CurrentCulture; CultureInfo culture1 =…
mahen
  • 165
  • 3
  • 16
0
votes
1 answer

using TwoLetterIsoLanguageName for ResourceManager

I have 6 resource files for 6 different languages (En, Nl, De, Es, It, Fr). I'm getting the string with ResourceManager.GetString, but it only seems to work if the AppResources file has the full en-EN, fr-FR etc. Is it possible to name the files…
Freerk92
  • 55
  • 1
  • 9
0
votes
1 answer

Missing CultureInfo on Server 2008 R2 x64

We have a Server 2008 R2 x64 machine that is throwing for culture "en-ID", while my dev machine (Windows 7 x64) works fine. new CultureInfo("en-id", false); Error: Culture name 'en-id' is not supported. Parameter name: name Do I need language…
Ty Norton
  • 319
  • 5
  • 14
0
votes
0 answers

Timezone mapping based SQL Server time zone info

I have following timezone list, which is a drop down in my application, I am facing now issue of daylight saving, I need to attached addition column in my table from sys.time_zone_info so can use AT TIME ZONE function: -12:00 (UTC-12:00)…
Furqan Misarwala
  • 1,743
  • 6
  • 26
  • 53