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?
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