title: Suggestions for supporting multilingual routes in ASP.NET MVC
body: <p>There were questions about multilingual apps in MVC here on SO but they were mostly answered by giving details about implementing Resource files and then referencing those Resource strings in Views or Controller. This works fine for me in conjunction with the detection of user's locale.</p>
  
  <p>What I want to do now is support localized routes. For instance, we have some <em>core</em> pages for each website like the Contact Us page.</p>
  
  <p>What I want to achieve is this:</p>
  
  <p>1) routes like this</p>
  
  <p>/en/Contact-us (English route)</p>
  
  <p>/sl/Kontakt (Slovenian route)</p>
  
  <p>2) these two routes both have to go to the same controller and action and these will not be localized (they will be in English because they are hidden away from the user since they are part of the site's core implementation):</p>
  
  <p>My thought is to make the Controller "Feedback" and Action "FeedbackForm"</p>
  
  <p>3) FeedbackForm would be a View or View User control (and it would use references to strings in RESX files, as I said before, I already have set this up and it works)</p>
  
  <p>4) I have a SetCulture attribute attached to BaseController which is the parent of all of my controllers and this attribute actually inherits FilterAttribute and implements IActionFilter - but what does it do? Well, it detects browser culture and sets that culture in a Session and in a cookie (forever) - this functionality is working fine too. It already effects the Views and View User Controls but at this time it does not effect routes.</p>
  
  <p>5) at the top of the page I will give the user a chance to choose his language (sl|en). This decision must override 4). If a user arrives at our website and is detected as Slovenian and they decide to switch to English, this decision must become permanent. From this time on SetCulture attribute must somehow loose its effect.</p>
  
  <p>6) After the switch, routes should immediately update - if the user was located at /sl/Kontakt
  he should immediately be redirected to /en/Contact-us.</p>
  
  <p>These are the constraints of the design I would like. Simply put, I do not want English routes while displaying localized content or vice-versa.</p>
  
  <p>Suggestions are welcome.</p>
  
  <p>EDIT:</p>
  
  <p>There's some information and guidance here - <a href="https://stackoverflow.com/questions/291405/multi-lingual-websites-with-asp-net-mvc">Multi-lingual websites with ASP.NET MVC</a>, but I would still like to hear more thoughts or practices on this problem.</p>