0
votes

I have a separate project with .resx files compiled into a standalone DLL assembly, SomeNamespace.Localization.

In another assembly, also used by the ASP.NET website in question, I reference some of the resources:

htmlControl.InnerText = SomeNamespace.Localization.ErrorMessages.PleaseFillDate

On the page in question, there is an InitilizeCulture() method:

Protected Overrides Sub InitializeCulture()
    Thread.CurrentThread.CurrentUICulture = New CultureInfo("fr-FR", False)
    Thread.CurrentThread.CurrentCulture = New CultureInfo("fr-FR", False)

    Page.Culture = "fr-FR"
    Page.UICulture = "fr-FR"
End Sub

Everything works just fine locally when I change the cultures to other ones. On the server though, the strings are always in the fallback language. I tried setting the application culture in the web.config file, too, no success.

When I output the UICulture just before the lines referencing the external resources, it displays a correct language:

HttpContext.Current.Trace.Write(Thread.CurrentThread.CurrentUICulture.Name) ' fr-FR

Please help me, how do I set the culture when using resources from an external assembly?

Thanks a lot!

1

1 Answers

0
votes

Have you copied to the server the localized resources DLLs placed in "fr-FR" folder? (they have names ending with .resources.dll)?