0

When I'm debugging on my computer, all the error message I receive from MVC are in french (both client and server side). For example, for the "nom" field in the register page, if I don't give a value I receive:

Le champ nom d'utilisateur est requis.

But when I'm on the production server, I get this:

The nom d'utilisateur field is required.

My computer culture is french, so I guess MVC detect that and use the default culture. I'm pretty sure my production server is in english. So I did the following step:

  1. Go into Properties/Assembly informations/ and put this in french.
  2. Didn't work so I put this line in the web.config

    < globalization culture="fr-CA" uiCulture="fr" />

It didn't work either....

I've read a lot of post on stack overflow (one here and one here in the bunch) but everyone of them are for people who want their site to be in 2 languages or more. I just want my website to be in french and that it act exactly like on my personnal machine. Since it work on my personnal machine, I guess all the needed reference are already there...

Is it possible? Can anybody help me? I don't want to create a resource file for a one language website...

Community
  • 1
  • 1
Jean-François Côté
  • 4,200
  • 11
  • 52
  • 88

2 Answers2

0

There is some information on this here: http://msdn.microsoft.com/en-us/library/gg674880%28v=vs.98%29.aspx

Apparently you will need to reference the french jquery locale and change the servers regional setting in Control Panel -> Regional and Language Options -> Location, however the download link on the msdn page is broken!

Ed W
  • 125
  • 3
  • 18
0

Try to set the culture in Application_BeginRequest, of course substituting whatever your culture is you want to use.

Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
Adam Tuliper
  • 29,982
  • 4
  • 53
  • 71