0

I have developed a simple website with MVC 5 .NET 4.5.1 There are some decimal values that I show them as a formatted string like this:

    <p>
      @Value.ToString("C0");
    </p>

As my PC regional settings sets to Persian-Farsi, this works fine on my PC when I run it and shows me the results as below (example value):

    R 123,456,000

After publishing the website to my host (provided by http://somee.com), the results changes to this:

    $ 123,456,000 

I know the culture of host web server is en-US and I want to change it.

Is there a way to change my web.config file to achieve this?

vaheeds
  • 2,594
  • 4
  • 26
  • 36

1 Answers1

2

Yes, there is. Add this to the web.config:

<configuration>
  <system.web>
    <globalization uiCulture="fa" culture="fa-IR" />
  </system.web>
</configuration>

This should set culture to Persian for the whole app

Andrei
  • 55,890
  • 9
  • 87
  • 108
  • Thanks for your answer, that give me the big idea. actually I set the **enableClientBasedCulture="true"** attribute plus your mentioned one. now that is worked correctly. thank you @Andrei – vaheeds Oct 25 '14 at 15:23