asp.net mvc - How to force a specific uiculture using web.config in MVC -
i have added resource.fr-fr.resx project , have done globalization setting in web.config follows.
<system.web> <globalization culture="fr-fr" uiculture="fr"/> </system.web> that need according http://msdn.microsoft.com/en-us/library/bz9tc508%28v=vs.80%29.aspx
but when run app still in english
i have checked "thread.currentthread.currentuiculture" in application_start() , says fr.
what missing? same thing has been posted in mvc 3 setting uiculture not work
but no answers.
culture not same thing language. "culture" set of formatting rules dates/times, currency, calendaring, , few other things (like text title casing rules).
setting civilization not automatically localize application (where localization when of human-readable strings translated language, such french). localization , ui translation long, painful , expensive process. asp.net not you.
if want localize application, need ensure human-readable strings stored in resource file (.resx in .net) , have created "satellite assemblies" contain translated strings other languages. need ensure ever string displayed user in application uses resources apis (or ide-generated helper classes). painful because means going in *.aspx files...
<p>hello, welcome. in english.</p> ...to this:
<p><%= resources.welcomemessage %></p> ...or (if have many strings managed resources helper class):
<p><%= resourcemanager.getstring("homepage_welcomemessage") %></p> ...doing this, of course, breaks visual-designers website, example.
asp.net-mvc localization web-config
No comments:
Post a Comment