Globalizing Applications

By default, MVC controls format and parse the data using American English culture. The decimal symbol is a period, the thousand separator is a comma, and the days of the week are "Sunday" through "Saturday".

If your application targets other cultures, register the appropriate culture by registering the MVC scripts in your HTML pages. MVC edition includes over 40 cultures (see the complete list ).

For example, to localize an application for the German culture, register the "de" culture while registering the scripts:

    @Html.C1().Scripts().Culture("de")
1
2
3
4
5
6
7
8
9
10
11
12
13
using System.Web.Mvc;
 
namespace LearnMvcClient.Controllers
{
    public partial class C1MvcController : Controller
    {
        // GET: Globalization
        public ActionResult Globalization()
        {
            return View();
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<h1>
    @Html.Raw(Resources.C1Mvc.Globalization_Title)
</h1>
<p>
    @Html.Raw(Resources.C1Mvc.Globalization_Text1)
</p>
<p>
    @Html.Raw(Resources.C1Mvc.Globalization_Text2)
</p>
<p>
    @Html.Raw(Resources.C1Mvc.Globalization_Text3)
</p>
<pre>
    @@Html.C1().Scripts().Culture("de")
</pre>