Database localization url routes with mvc 2?http://forums.asp.net/t/1644367.aspx/1?Database+localization+url+routes+with+mvc+2+Sun, 23 Jan 2011 15:49:31 -050016443674262069http://forums.asp.net/p/1644367/4262069.aspx/1?Database+localization+url+routes+with+mvc+2+Database localization url routes with mvc 2? <p>Hi. I been looking for hours on the web to find a good tutorial where I can do a database localization with mvc 2, I can't find any its all resource files. So I'm trying to reach out to you guys and see if you got any links, books or suggestions on this topic? I would love for it to be url routes based localization but that I can figure out somehow i think. Thanks </p> 2011-01-19T21:15:30-05:004262369http://forums.asp.net/p/1644367/4262369.aspx/1?Re+Database+localization+url+routes+with+mvc+2+Re: Database localization url routes with mvc 2? <p>See this:</p> <p><a href="http://forums.asp.net/t/1641542.aspx">http://forums.asp.net/t/1641542.aspx</a>&nbsp;</p> 2011-01-20T03:52:13-05:004262884http://forums.asp.net/p/1644367/4262884.aspx/1?Re+Database+localization+url+routes+with+mvc+2+Re: Database localization url routes with mvc 2? <p>Thanks Raduenuca, but this was not really what im looking for, for the moment i think i got the url routing problem done with /en-US/Site.. What seem impossible to find is the database tutorial. Why is there not a mvc/omr example of this out? its a pretty common task people would use and from what i seen a lot is wondering about it.</p> 2011-01-20T08:23:24-05:004262925http://forums.asp.net/p/1644367/4262925.aspx/1?Re+Database+localization+url+routes+with+mvc+2+Re: Database localization url routes with mvc 2? <p>If you look for&nbsp;examples using databases&nbsp; and EF &nbsp;with mvc there are a lot, but this has nothing to do with the localization problem. Localization is done with the help of resource files. Please specify better the features of the example you need(just list all features).</p> 2011-01-20T08:42:10-05:004263062http://forums.asp.net/p/1644367/4263062.aspx/1?Re+Database+localization+url+routes+with+mvc+2+Re: Database localization url routes with mvc 2? <p>Hi Franesco. Like i described in my first post I'm looking for a way to handle localization through a database and not resource files, i know it can be done i seen it but there are no good examples of it that i can find. So im looking for - Database localization for a asp.net mvc 2 project - entity framework 4 or nhibernate as OMR </p> 2011-01-20T09:55:06-05:004263446http://forums.asp.net/p/1644367/4263446.aspx/1?Re+Database+localization+url+routes+with+mvc+2+Re: Database localization url routes with mvc 2? <p>If you want&nbsp;to use&nbsp;database for localization, just use anything (EF, plain old ADO.NET, nHibernate etc) that you would use to query database based on what incoming culture information you got from the client.</p> <p>Am I missing something here?</p> 2011-01-20T13:27:39-05:004263520http://forums.asp.net/p/1644367/4263520.aspx/1?Re+Database+localization+url+routes+with+mvc+2+Re: Database localization url routes with mvc 2? <p>Hi sachingusain I get that but how do you go about making it work so the localization gets the info from the database and use it, instead of the resource file? thats where the problem is.</p> <p><br> </p> <p>I got no problems no problem with handling EF or Nhibernate but that has nothing to do with this matter except that is what I would like to use for it. It is how to kinda connect the resource database to the localization part that is the problem. There are a lot of tutorials on how to use resource files but no good one with database. so that is what Im looking for..</p> 2011-01-20T14:04:34-05:004263539http://forums.asp.net/p/1644367/4263539.aspx/1?Re+Database+localization+url+routes+with+mvc+2+Re: Database localization url routes with mvc 2? <p>Refer to this post from Scott: <a href="http://weblogs.asp.net/scottgu/archive/2006/05/30/ASP.NET-2.0-Localization-_2800_Video_2C00_-Whitepaper_2C00_-and-Database-Provider-Support_2900_.aspx"> http://weblogs.asp.net/scottgu/archive/2006/05/30/ASP.NET-2.0-Localization-_2800_Video_2C00_-Whitepaper_2C00_-and-Database-Provider-Support_2900_.aspx</a></p> <p>Within that you can see: &quot;<font face="Arial" size="2">Jeff Modzel recently published an article that shows how to build a custom Resource Provider that stores the resource strings in a database instead.&quot;</font></p> <p><font face="Arial" size="2">Refer that article and you can&nbsp;go from there. Note that even if the article would say ASP.NET, I am sure this can be done in MVC too without constraints (with some tweaking, ofcourse).</font>&nbsp;</p> <p>You can also refer to &quot;Extending the ASP.NET 2.0 Resource-Provider Model&quot; article here: <a href="http://msdn.microsoft.com/en-us/library/aa905797.aspx">http://msdn.microsoft.com/en-us/library/aa905797.aspx</a></p> <p>Again, it might refer to ASP.NET but you can do it in MVC too.</p> <p>&nbsp;</p> 2011-01-20T14:14:43-05:004263759http://forums.asp.net/p/1644367/4263759.aspx/1?Re+Database+localization+url+routes+with+mvc+2+Re: Database localization url routes with mvc 2? <p>&nbsp;I think @<a href="/members/sachingusain.aspx"><font color="#034efa">sachingusain</font></a>&nbsp;gave you the solution.&nbsp;I add just that localization is not specific to either Asp.net, Mvc or windows form but is a general .Net concept, so any example dealing with&nbsp;localization with db is ok. The only peculiarity of MVC that, however is common also to Web Forms, is that you can set the currentUICulture simply by setting it in globalization section of the configuration file a fixed culture&nbsp;or &quot;auto&quot; in which case MVC or web froms will do culture autodetection based on information sent by the browser. Autodetection is a good starting point, then you can redirect the user to a culure specific url that set always the same culture. Obviously it is convenient to give also the opportunity to change culture manually.</p> <p>Don't forget also of globalization of date and numbers....To handle them properly in client validation there is some job to be done...it is not automatic.</p> 2011-01-20T16:31:16-05:004267504http://forums.asp.net/p/1644367/4267504.aspx/1?Re+Database+localization+url+routes+with+mvc+2+Re: Database localization url routes with mvc 2? <p>Thanks for the links. I found that the other day looking but I thought it was a bit complicated (or maybe I made it complicated?). Anyway I'll try this out today but if anybody got sample code they would love to share that would be awesome and welcome.&nbsp;</p> <p><br> </p> <p>Thanks agin this place rocks</p> 2011-01-23T15:23:11-05:004267522http://forums.asp.net/p/1644367/4267522.aspx/1?Re+Database+localization+url+routes+with+mvc+2+Re: Database localization url routes with mvc 2? <p>Wrong post, delete pls.</p> <p><br> </p> 2011-01-23T15:49:31-05:00