I've been searching for a while for a good example of localizing an C# ASP.NET MVC 2 application but storing the data in the database instead of .RESX files. Unfortunately I've had no luck finding a good example and was hoping someone else may know and could point me in the right direction?
Many thanks for any help/advice/articles
Image is used from: Globalization. In Visual Studio 2013 select "File" from the menu and inside that select Project and then a New Dialog will popup with the name New project. Inside that select Templates then select Visual C# and then inside that select web then select ASP.NET MVC 4 Web Application.
One way you can do it is to have the drop down just redirect the page to a language specific URL (this is quite nice as you can send around language specific links) then in a base class on your controller, set the Thread's locale. This example has . aspx pages not razor . cshtml.
Resource provider model:
http://msdn.microsoft.com/en-us/library/aa905797.aspx
Scroll down to the section titled Building a Database Resource Provider.
I'd also recommend these links:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With