Moved localization source configuration to preinitialize.

This commit is contained in:
hikalkan 2014-10-29 13:12:05 +02:00
Родитель dd073d4601
Коммит 8aa48dc3fa
2 изменённых файлов: 16 добавлений и 14 удалений

Просмотреть файл

@ -18,6 +18,14 @@ namespace SimpleTaskSystem.WebSpaAngular
Configuration.Localization.Languages.Add(new LanguageInfo("en", "English", "famfamfam-flag-england", true));
Configuration.Localization.Languages.Add(new LanguageInfo("tr", "Türkçe", "famfamfam-flag-tr"));
//Add a localization source
Configuration.Localization.Sources.Add(
new XmlLocalizationSource(
"SimpleTaskSystem",
HttpContext.Current.Server.MapPath("~/Localization/SimpleTaskSystem")
)
);
//Configure navigation/menu
Configuration.Navigation.Providers.Add<SimpleTaskSystemNavigationProvider>();
}
@ -26,13 +34,6 @@ namespace SimpleTaskSystem.WebSpaAngular
{
IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
Configuration.Localization.Sources.Add(
new XmlLocalizationSource(
"SimpleTaskSystem",
HttpContext.Current.Server.MapPath("~/Localization/SimpleTaskSystem")
)
);
AreaRegistration.RegisterAllAreas();
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);

Просмотреть файл

@ -18,6 +18,14 @@ namespace SimpleTaskSystem.WebSpaDurandal
Configuration.Localization.Languages.Add(new LanguageInfo("en", "English", "famfamfam-flag-england", true));
Configuration.Localization.Languages.Add(new LanguageInfo("tr", "Türkçe", "famfamfam-flag-tr"));
//Add a localization source
Configuration.Localization.Sources.Add(
new XmlLocalizationSource(
"SimpleTaskSystem",
HttpContext.Current.Server.MapPath("~/Localization/SimpleTaskSystem")
)
);
//Configure navigation/menu
Configuration.Navigation.Providers.Add<SimpleTaskSystemNavigationProvider>();
}
@ -26,13 +34,6 @@ namespace SimpleTaskSystem.WebSpaDurandal
{
IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
Configuration.Localization.Sources.Add(
new XmlLocalizationSource(
"SimpleTaskSystem",
HttpContext.Current.Server.MapPath("~/Localization/SimpleTaskSystem")
)
);
AreaRegistration.RegisterAllAreas();
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);