Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Localized resources not loaded

I have an application in ASP.NET MVC 5.2.3 with localized satellite assemblies installed by NuGet to show pt-BR validation messages downloaded in:

https://www.nuget.org/packages/Microsoft.AspNet.Mvc.pt-br/

It works and loads all pt-BR localized strings in my development environment, but when I publish in one of our servers the messages still showed in en-US.

The screenshot bellow shows some information about MVC Version and Culture and UI Culture:

enter image description here

It seems that the resource dll wasn't loaded, but, the application is running in pt-BR culture.

The resource DLL System.Web.Mvc.resources.dll is found in /bin/pt-BR folder.

The web.config globalization section is configured:

<!-- language: lang-html -->

    <globalization culture="pt-BR" uiCulture="pt-BR" enableClientBasedCulture="false" />

Anyone has an idea?

bin directory content list:

\bin\Antlr3.Runtime.dll
\bin\Autofac.dll
\bin\Autofac.Integration.Mvc.dll
\bin\Autofac.Integration.WebApi.dll
\bin\AutoMapper.dll
\bin\AutoMapper.Net4.dll
\bin\BootGridMvc.dll
\bin\CookComputing.XmlRpcV2.dll
\bin\EntityFramework.dll
\bin\EntityFramework.SqlServer.dll
\bin\MyApp.Core.Business.dll
\bin\MyApp.Core.Data.dll
\bin\MyApp.Core.Models.dll
\bin\MyApp.Core.Report.dll
\bin\MyApp.Web.Mvc.dll
\bin\itextsharp.dll
\bin\Microsoft.AspNet.Identity.Core.dll
\bin\Microsoft.AspNet.Identity.EntityFramework.dll
\bin\Microsoft.AspNet.Identity.Owin.dll
\bin\Microsoft.Owin.dll
\bin\Microsoft.Owin.Host.SystemWeb.dll
\bin\Microsoft.Owin.Security.Cookies.dll
\bin\Microsoft.Owin.Security.dll
\bin\Microsoft.Owin.Security.Facebook.dll
\bin\Microsoft.Owin.Security.Google.dll
\bin\Microsoft.Owin.Security.MicrosoftAccount.dll
\bin\Microsoft.Owin.Security.OAuth.dll
\bin\Microsoft.Owin.Security.Twitter.dll
\bin\Microsoft.Web.Infrastructure.dll
\bin\Newtonsoft.Json.dll
\bin\Owin.dll
\bin\Portable.Licensing.dll
\bin\System.Net.Http.Formatting.dll
\bin\System.Web.Helpers.dll
\bin\System.Web.Http.dll
\bin\System.Web.Http.WebHost.dll
\bin\System.Web.Mvc.dll
\bin\System.Web.Optimization.dll
\bin\System.Web.Razor.dll
\bin\System.Web.WebPages.Deployment.dll
\bin\System.Web.WebPages.dll
\bin\System.Web.WebPages.Razor.dll
\bin\T4MVCExtensions.dll
\bin\WebGrease.dll
\bin\pt-br
\bin\pt-br\System.Web.Mvc.resources.dll

like image 769
Luciano Gerhardt Avatar asked May 27 '15 14:05

Luciano Gerhardt


1 Answers

It might be a stupid suggestion, but make sure that you reference the localized resource dll's in your .nuspec file so that they are actually included when you package the NuGet bundle.

like image 190
Sebastian P. Avatar answered Nov 16 '22 11:11

Sebastian P.