I have an ASP.NET MVC4 Application. I use ninject for DI and WebActivator to setup the environment.
Inside the Start method, System.Globalization.CultureInfo.CurrentCulture reads correctly from the web.config as “es-DO” which is the declared locale:
public static void Start()
{
DynamicModuleUtility.RegisterModule(typeof(OnePerRequestHttpModule));
DynamicModuleUtility.RegisterModule(typeof(NinjectHttpModule));
Bootstrapper.Initialize(CreateKernel);
}
Inside the PostStart method where I set routes and minification bundles the locale changes to “en-US”. Which I assume is the default locale
public static void PostStart()
{
ValidationSettings.UnobtrusiveValidationMode = UnobtrusiveValidationMode.None;
RouteConfig.RegisterRoutes();
GlobalFilterConfig.RegisterFilters();
BundleConfig.RegisterBundles(BundleTable.Bundles);
AuthConfig.RegisterAuth();
}
Does anyone know why this happens? the BundleConfig.RegisterBundles method relies on the Culture information to load the corresponding javascript files.
We fixed it like this: