SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I followed this tutorial to create a resource file named GlobalResources.resx under Resources.

Resources file in root

I am able to access the content of the resource file using:

string resourceVal = SPUtility.GetLocalizedString("$Resources:GlobalResources, ResourceKey", 
"GloablResources", language);

However, to follow company coding standards, I am required to move the resources file into a folder named <client>.<project>.<department>.<farm|sandbox>.
So I did this:

Resource file in sub-folder

But now I'm not able access the resource values!

I tried the following...


SPUtility.GetLocalizedString("$Resources:Comp.Dept.Proj.Farm/GlobalResources, ResourceKey", 
"Comp.Dept.Proj.Farm/GlobalResources", language);


SPUtility.GetLocalizedString("$Resources:Comp.Dept.Proj.Farm\\GlobalResources, ResourceKey", 
"Comp.Dept.Proj.Farm\\GlobalResources", language);


SPUtility.GetLocalizedString("$Resources:Comp.Dept.Proj.Farm.GlobalResources, ResourceKey", 
"Comp.Dept.Proj.Farm.GlobalResources", language);

...but none of them worked.

How do I access the resource file that's not in the root of the Resources folder?

share|improve this question
up vote 3 down vote accepted
SPUtility.GetLocalizedString("$Resources:YourKeyValue", "Comp.Dept.Proj.Farm\\GloablResources", 1033);

plz refer this link

share|improve this answer

did you try this $Resources:Comp.Dept.Proj.Farm\GlobalResources or $Resources:`/Comp.Dept.Proj.Farm/GlobalResources?

also check this msdn for

check this guy

share|improve this answer

The folder becomes part of the namespace. I think you are almost there with option c), but as first parameter write the key "$Resources: ResourceName".

For example if in the resource file you have key-value pair with name = "MyFieldName" and value="MyField" then this should work:

SPUtility.GetLocalizedString("$Resources:MyFieldName", "Comp.Dept.Proj.Farm.GloablResources", language);

And don't forget to run copyappbincontent command.

share|improve this answer
Thanks for the asnwer, but sorry, specifying the resource filename as Comp.Dept.Proj.Farm.GlobalResources didn't work for me. Instead, Comp.Dept.Proj.Farm\\GlobalResources did. – SNag Dec 24 '13 at 8:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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