i usially crate a controller which have a common sense to all the languages...
but now i need to show different controller for each language..
Exemple i have :
public class MagazineController : Controller
{
private ApplicationDbContext db = new ApplicationDbContext();
public ActionResult Page()
{
//ViewBag.Message = "This page does not exist";
return View();
}
I recommend learning MVC routing. Do some research using search engine like Google to find how others have implemented this feature;
https://www.google.com/search?q=asp.net+mvc+route+localization. Then come up with design using your new found knowledge. Finally, implement the design.
Member
327 Points
1770 Posts
Show Controller and view name according to language
Sep 20, 2020 11:45 AM|grafic.web|LINK
hi, my web site is multilingual :
en
fr
it
es
i usially crate a controller which have a common sense to all the languages...
but now i need to show different controller for each language..
Exemple i have :
The results is :
mywebsite/Magazine/Page/
what i need is
mywebsite/Riivsta/Pagina/
mywebsite/Journal/Article/
mywebsite/Rivistas/Pagionas/
how to do?
All-Star
52961 Points
23563 Posts
Re: Show Controller and view name according to language
Sep 20, 2020 12:11 PM|mgebhard|LINK
I recommend learning MVC routing. Do some research using search engine like Google to find how others have implemented this feature; https://www.google.com/search?q=asp.net+mvc+route+localization. Then come up with design using your new found knowledge. Finally, implement the design.