I need help with the best practice to localize asp mvc apps, I saw Oxite having a base method named Localize in the BaseController, but is the Localization a task for the view or the Controller? Or should I use resx files / or use db tables?
+5
A:
Create your own Html helper and use it like <%= Html.Resource("Name") %>
Details are in blog post.
Ihar Voitka
2008-12-19 15:41:53
Just so everyone is aware, the post Ihar links to now has an update. See: http://blog.eworldui.net/post/2008/10/ASPNET-MVC-Simplified-Localization-via-ViewEngines.aspx
Robert Claypool
2009-08-31 14:13:42
The updated link doesn't work either. :(
bradjive
2010-03-16 13:32:49
A:
If the string to be localized is generated by the view (eg a label in front of a text field), then its localization should be in the View.
If the string is generated by the Controller, its localization should be there as well.
Paul Lalonde
2008-12-20 17:19:03
+2
A:
There is good solution for this available here
this article covers all aspects of localization asp.net mvc app
Michael Vald
2010-02-23 07:31:30