culture

Is it possible to set the CultureInfo for an .NET application or just a thread?

I've an application written in C# which has no GUI or UI, but instead writes files that are parsed by another application (in XML and others). I have a customer whose CultureInfo has the NumberDecimalSeparator set to a comma, which causes parsing errors with floating point numbers (PI would end up as 3,1415). I'd like a way to set the ...

Parse DateTime in c# from strange format

Hi, if i have a datetime string in a weird format, such as YYYY##MM##DD HH**M**SS, how can i create a new datetime object base on that? i have read something about the datetimeformatinfoclass but not sure how to get it working.. ...

What is LCID 127?

In asp.net what is the culture represented by LCID 127? <%Response.Write(System.Globalization.CultureInfo.InvariantCulture.LCID)%> Output = 127. ...

C# Set specific culture for class

I have a class in C# which has various methods. I want to use en-US culture in all the methods in this class. Can I set the culture for a specific class? Background: I have a List<object> and some of the object's are numbers and some are strings. I would like all the numbers written using US culture, but I don't know which items are nu...

Using AJAX Control Toolkits NumericUpDown Control with Comma as Decimal Separator

We are trying to use the NumericUpDown Control from the AJAX Control Toolkit, but can find no way to make it use a comma as a decimal separator instead of a point. Other controls such as the Calendar will automatically use the Page Culture and adapt their content according to it. Do anyone know a way to change the Decimal Separator? ...

Culture resouce files

Hi there, I'm working on an ASP.NET app I have a couple of resource files with the different languages I can support example: Language.en.resx Language.pt.resx is there any way to get, for example, a list with all the different languages dinamically? tks ...

.NET: Are there any differences between InvariantCulture and en-US?

Given the following two cultures: CultureInfo c1 = InvariantCulture; CultureInfo c2 = new CultureInfo("en-US"); and i were to examine every piece of information specific to both cultures, e.g.: c1.DateTimeInfo.ShortDatePattern; c2.DateTimeInfo.ShortDatePattern; c1.DateTimeInfo.LongDatePattern; c2.DateTimeInfo.LongDatePattern; c1.Nu...

String.FormatException with DateTime in non US Culture

I am getting a String.FormatException trying to convert/parse a string when the culture is other than non-US. The odd thing is that the string was generated by applying the very same format and culture as those being used to parse it back into a string. In the code below, all of these versions will fail: const string culture = "ja-JP...

Where is the correct place to do culture-specific date/currency formatting for asp.net mvc views?

Given a domain object: class BirthdayDomain { public DateTime Birthday { get; set; } public decimal BirthdayPresent { get; set; } } I have two options for passing this to a strongly-typed view: 1. class BirthdayView { public DateTime Birthday { get; set; } public decimal BirthdayPresent { get; set; } } and in the...

C# BackgroundWorker's culture

Hi, I woudl like to set the culture for my whole application. I tried the following : Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(wantedCulture); Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture(wantedCulture); Application.CurrentCulture = CultureInfo.CreateSpecificCulture(wantedCul...

C# KeyDown alphanumeric culture dependent !

How to determine if the pressed Key is an alphabetical key regard to the culture specific keys: e.g.: '[' = 'ú' = 'ü' ... is the same key but with different value on different language Keyboards. I've tried to compare the ordinal key value: (int)e.Key >= 0x20E ..and <= .. but it does not work well, as modifier keys have sometimes s...

Please explain "How Fanboys See .NET Data Access Strategies"

This chart has been linked a number of times on blogs that I follow and I feel like a rube not getting it. So, going out on a limb here and asking this community. Please explain this grid from the blog post here. ...

Change language at runtime

How to change language at run time in .net ? It is possible? (i.e. English to Hindi or any other language.) in desktop application... ...

How can I query the database culture (SQL Server 2005) ?

How can I query the database culture (SQL Server 2005) ? I have problems inserting and getting dates, because the client's servers don't run on the same culture as my developer server. I can adjust the date, but I need to know the server's culture... ...

SQL Server: how to set return format ?

Question: The new SQL Server 2008 database returns me values formatted English (date/float). Is there a way I can set the return format ? For example temporarely switching the database language? Or just set the language for the current query ? ...

If you have an application localized in pt-br and pt-pt, what language you should choose if the system is reporting only "pt" code?

If you have an application localized in pt-br and pt-pt, what language you should choose if the system is reporting only pt code (generic Portuguese)? This question is independent of the nature of the application, desktop, mobile or browser based. Let's assume you are not able to get region information from another source and you have ...

What is a String Culture

Just trying to understand that - I have never used it before. How is a culture different to ToUpper() / ToLower()?? ...

Culture specific characters to nice URL format

Hi I need some functionality to make the following string in a url-friendly format: "knæ som gør" should be "kna-som-gor" That is, replacing culture specific characters to characters that can be used in urls. Using .Net and C# Please help me :) /Andreas ...

Is there any way for getting the direction of writing in specific culture?

Possible Duplicate: Is there any way to determine text direction from CultureInfo in asp.net? I want to get writing direction of any culture that user select in my application. for example I want to get rtl when my user use fa-IR culture and get ltr when en-US is selected. Is there a built-in solution for this in .NET? ...

SharePoint 2007 Force Culture and UI Culture

i'm developing a sharepoint portal, and i want to force a portal culture to 'pt-PT', i already installed the moss and wss language packs and i changed the web.config too with the following statment: but if i set the browser language to other language the controls change their culture (this only occurs in portal frontoffice, in backoffic...