Plenty of links, no definitive answer found. How to use localizable resource files and change the current locale for a user under sharepoint AND external apps.

I have global resources deployed with my solution. The default invariant file works absolutely fine, but when I set the user's locale to something different, the locale is not being picked up.

Do we need satelite assemblies? I see VS2010 is creating folders and dlls under the bin directory one for each culture variant - but with the same name!? So this post is erroneous as u cant add the same dll name to the package.

I would like to be able to load the resources from the dll so that other apps (services/consoles) can also access these resources.

Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("zh-HK");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("zh-HK");
object o = HttpContext.GetGlobalResourceObject("myAppResources", "FRONT_PAGE_INTRO");

This is what VS2010 has in the manifest:

    <App_GlobalResourceFile Location="myApp\myAppResources.resx" />
    <App_GlobalResourceFile Location="myApp\myAppResources.zh-HK.resx" />


<Assembly Location="myApp.resources.dll" DeploymentTarget="GlobalAssemblyCache" />

1 Answer 1


Turned out to be where I was registering the locale, this needs to be in the PreRequestHandler not the BeginRequest one.

application.PreRequestHandlerExecute += SetLocale;


application.BeginRequest += SetLocale;

private void SetLocale(object sender, EventArgs e)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.