Reputation: 119
I need to develop a web site with a long long list of requirements.
One of those is allowing the site admin to add new languages to the site (that's something easy I would say, resources and voila), but with that language I need to "culturalize" the site, this is, changing the currency, changing the date format, changing the decimal separator (comma in Argentina, dots in US), and stuff like that.
So, my question is: Are there any easy way to do this job? What can you recommend me to do it? If the solution is using resource files, and you have any example, that'd be great.
I'm trying to avoid jQuery because the tool that does the required thing is more like a plugin rather than a "script", and also isn't very trustworth or reliable, I think.
Upvotes: 3
Views: 664
Reputation: 4458
Take a look at ASP.NET Infrastructure for ASP.NET MVC3, the Globalization video. This is a great video that goes over the basics of everything you will need.
Thread.CurrentCulture gets or sets the current culture.
Thread.CurrentUICulture handles resources for each language.
There is also a <globalization>
section in the Web.Config
.
Hopefully this will get you on the rite track.
Upvotes: 1