Cultura: aplicación ASP.NET MVC 3

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.

preguntado el 25 de agosto de 12 a las 16:08

Not the answer to your question, but this could also help you save time: ruijarimba.wordpress.com/2011/05/16/… -

This would definitely help you adamyan.blogspot.in/2010/02/… -

1 Respuestas

Echa un vistazo a 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.

Hilo.Cultura actual gets or sets the current culture.

Thread.CurrentUICulture handles resources for each language.

También hay una <globalization> sección en el Web.Config.

Hopefully this will get you on the rite track.

Respondido 26 ago 12, 06:08

Hey, thanks a lot... I'm now doing the things in this way and even I didn't implemented de CurrentCulture yet, I think this might be the answer that nailed my question. About that <globalization> section, I have another question. If I select CurrentCulture="auto" and CurrentUICulture="auto", is there any way for the user selection to override that configuration? As an example, lets suppose that my work PC has its Explorer set to pt-BR (portugues from Brazil), and a site supports that as a locale. The thing is that I am in Argentina... the "auto" will choose pt-BR anytime or I can handle it? - JuanC

Creo que el auto will use whatever the user browser's culture is set to, as long as that culture exists. But I don't know for sure. - garrett fogerlie

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.