culture

Setting requested Culture when consuming web services

I am looking for some solution how I could easily set the requested Culture at client and get it on server. So I would get for example return error message in requested language. Is there way to set it on WebRequest or WebMethod? Any suggestion most welcome. Thanks X. Edit: Finally I used Soap header to carry cultureinfo setting from...

Asp.Net resource manager always returns neutral culture resources

I am using embedded .resx to localize an asp.net application. It seems that no matter what the current culture is, the neutral culture resource is always returned. The code I am using to retrieve the value is as follows: protected string GetResource(string name) { return Localization.ResCore.ResourceManager.GetString(name,...

Windows Invariant Culture Puzzle

I have a question about the windows invariant culture. Succinctly, my question is: does there exist any pair of characters c1, and c2 such that: lower(c1, invariant) =latin-general lower(c2, Invariant) but lower(c1, invaraint) !=invariant lower(c2, invariant) Background: I need to store an invariant lower case string (represen...

How do I tell my application which resx file to use when it is passed a culture it doesn't understand? (WPF)

Subject says it all. I have Resources.en-US.resx, Resources.de-DE.resx, etc. I don't ever want the basic Resources.resx file to be referenced. If someone passes me a language that I don't have a resx for I want it to drop back and use Resources.en-US.resx. Anyone? ...

Page.UICulture -- How do I retrieve the Two Letter UICulture Code?

In ASP.NET webforms, when setting UICulture="en" in the @Page directive, a Response.Write(Page.UICulture) returns the string "English" instead of the two letter language code "en". Is the the only way to return the two letter language name by using this? CultureInfo.CurrentUICulture.TwoLetterISOLanguageName Or is there a better / mor...

Click Once Deploy/Setup Project

Hi, im getting the following errors when i set ProjectProperties->Publish->Options->Publish Language to German: Warning 1 Could not match culture 'de-DE' for item 'Windows Installer 3.1'. Using culture 'en' instead. * Warning 2 Could not match culture 'de-DE' for item '.NET Framework 3.5'. Using culture 'en' instead. Im using German ...

How are the chinese coding?

Do they code in Latin? Do they have their own programming language? I'm just curious. ...

Forcing a culture on an application

How can I force and application and any threads that are started by that application to run under a specific culture? I have tried the following but I still get exceptions in English. My understanding was that the wording on exceptions are translated using the active culture. static void Main(string[] args) { Thread.C...

Obtaining the culture of the web server

Is there a way to obtain the culture of the server my web application is deployed on through code? We are running an asp.net c# web application on an IIS 7 box with Crystal Reports installed. ...

How can I emulate MbUnit's [MultipleCulture] attribute in MSTest?

MbUnit has a great attribute: MultipleCultureAttribute. I am wondering if there is an easy way to do this in MSTest? So far, the best I can come up with is: Externalizating the actual test code to a private method Saving the current culture Setting the culture and calling the private method (repeated for each culture) And finally, rev...

Is Culture in C# equivalent to Locale in Java?

C# uses the concept of Culture. Is this operationally similar to Locale in Java or are there significant differences in the underlying concepts? ...

C#: What does MissingManifestResourceException mean and how to fix it?

The situation: I have a class library, called RT.Servers, containing a few resources (of type byte[], but I don't think that's important) The same class library contains a method which returns one of those resources I have a simple program (with a reference to that library) that only calls that single method I get a MissingManifestRe...

Asp.Net /C# when is Å equal to A? (and É equal to E)

Hi, i'm paging countries in an alfabet, so countries starting A-D, E-H etc. But i also want to list åbrohw at the a, and ëpollewop at the e. I tried string.startswith providing a stringcompare option, but it doesn't work... i'm running under the sv-SE culture code, if that matters... Michel ...

Linq expression decimal culture

Hello, I have this piece of code: fee.SingleOrDefault(f => 100.05M >= f.Rate); In the database the Fee.Rate is a money field stored using invariant culture. But using this select gives an error because my current culture will convert "100.05" to "100,05" wihich results in; An expression of non-boolean type specified in a context whe...

.NET global culture on a new server

We've just moved to a new server and everything's being going well. However earlier I ran into a .NET error when it was trying to convert a string in the format "dd/mm/yyyy" to a date, now I changed the culture setting in the local web.config but we require this to be global. Where do I change this? I assumed the machine.config but I co...

Has C#/.NET builtin conversion routines for length units?

Has C#/the .NET library builtin routines or constants for converting e. g. millimetres to inches? If so, where can I find them? (I just do not want to produce duplicate code again and again.) ...

c# datetime format

I wish to have a specific format for my DateTime depending on the current culture. So I try this: dateTime.ToString("dd/MM/yyyy hh:mm"); This is partially OK, the / gets replaced by the culture-specific separator. But the day and month order are not switched (like MM/dd) depending on the culture. Using .ToString("g") works, but tha...

get cultureinfo with country code

Hi, I try to get CultureInfo with country code. I'm using hostip.info for getting country code. For example, "http://api.hostip.info/?ip=207.46.197.32&position=true" returns me "US" for country code or http://api.hostip.info/?ip=82.151.131.196&position=true returns "TR". If I could have "en-US", "tr-TR", it's easy, but I can't...

Set Culture in an ASP.Net MVC app

What is the best place to set the Culture/UI Culture in an ASP.net MVC app Currently I have a CultureController class which looks like this: public class CultureController : Controller { public ActionResult SetSpanishCulture() { HttpContext.Session["culture"] = "es-ES"; return RedirectToActio...

How do I set a custom culture before the page is rendered?

I have created a custom culture for client-specific language, i.e. I have resx files for that culture. The issue I have is that I can't seem to set the culture early enough in the page cycle. By the time I call Thread.CurrentThread.CurrentUICulture = culture and Thread.CurrentThread.CurrentCulture = culture the page seems to already have...