public override void RegisterArea(AreaRegistrationContext context) { // TRANSLATION ROUTING CultureInfo cultureEN = CultureInfo.GetCultureInfo("en-US"); CultureInfo cultureIT = CultureInfo.GetCultureInfo("it-IT"); DictionaryRouteValueTranslationProvider translationProvider = new DictionaryRouteValueTranslationProvider( new List<RouteValueTranslation> { //new RouteValueTranslation(cultureIT, "Login", "login"), //new RouteValueTranslation(cultureIT, "RecoveryPassword", "recupera-la-password"), //new RouteValueTranslation(cultureIT, "Register", "registrazione-di-un-nuovo-utente"), //new RouteValueTranslation(cultureIT, "registerLink", "link-per-registrarsi"), //new RouteValueTranslation(cultureIT, "loginLink", "link-per-loggarsi"), //new RouteValueTranslation(cultureIT, "EmailSent", "password-per-il-gestionale-inviata"), } ); context.MapTranslatedRoute( "Account_default", "account/{action}/{id}", new { controller = "Account", action = "Index", id = UrlParameter.Optional }, new { controller = translationProvider, action = translationProvider }, true); }
public override void RegisterArea(AreaRegistrationContext context) { // TRANSLATION ROUTING CultureInfo cultureEN = CultureInfo.GetCultureInfo("en-US"); CultureInfo cultureIT = CultureInfo.GetCultureInfo("it-IT"); DictionaryRouteValueTranslationProvider translationProvider = new DictionaryRouteValueTranslationProvider( new List<RouteValueTranslation> { //new RouteValueTranslation(cultureIT, "Document", "preventivi-commesse-tipografia"), //new RouteValueTranslation(cultureIT, "ListEstimate", "elenco-documenti-centro-stampa"), //new RouteValueTranslation(cultureIT, "CreateProduct", "inserimento-di-uno-stampato"), //new RouteValueTranslation(cultureIT, "Error", "errore"), //new RouteValueTranslation(cultureIT, "NoTaskEstimatedOnException", "manca-definizione-costo") } ); context.MapTranslatedRoute( "Working_default", "working-area/{controller}/{action}/{id}", new { controller = "Working", action = "Index", id = UrlParameter.Optional }, new { controller = translationProvider, action = translationProvider }, true); //context.MapRoute( // "Working_default", // "Working/{controller}/{action}/{id}", // new { action = "Index", id = UrlParameter.Optional } //); }
public override void RegisterArea(AreaRegistrationContext context) { // TRANSLATION ROUTING CultureInfo cultureEN = CultureInfo.GetCultureInfo("en-US"); CultureInfo cultureIT = CultureInfo.GetCultureInfo("it-IT"); DictionaryRouteValueTranslationProvider translationProvider = new DictionaryRouteValueTranslationProvider( new List<RouteValueTranslation> { new RouteValueTranslation(cultureIT, "HomeDb", "configuratore-stampa-e-carta"), new RouteValueTranslation(cultureIT, "Article", "materiale-in-anagrafica"), new RouteValueTranslation(cultureIT, "CustomerSupplier", "anagrafica-clienti-fornitori-tipografia"), new RouteValueTranslation(cultureIT, "IndexSheetPrintableArticle", "a-foglio-stampa-digitale-offset"), new RouteValueTranslation(cultureIT, "IndexRollPrintableArticle", "a-rotolo-stampa-etichette-digitale-offset"), new RouteValueTranslation(cultureIT, "IndexRigidPrintableArticle", "rigido-forex-vetrofanie-plotter-uv"), new RouteValueTranslation(cultureIT, "TaskExecutor", "macchina-da-stampa-o-lavorazione"), } ); context.MapTranslatedRoute( "DataBase_Translated", "database/{controller}/{action}/{id}", new { controller = "DataBase", action = "Index", id = UrlParameter.Optional }, new { controller = translationProvider, action = translationProvider }, true); //context.MapRoute( // "DataBase_default", // "Anagrafica/{controller}/{action}/{id}", // new { controller = "DataBase", action = "Index", id = UrlParameter.Optional } //); }