I have created a sandbox project in sharepoint. I have a module folder which has resources file. I need to localize one label in a web part in Arabic language.

<asp:Label ID="lbl" runat="server"   Visible="true"  Text="<%$Resources:TestArabic,ObjectiveCode%>"></asp:Label>

The resource file name is TestArabic.ar-SA.resx . Name: ObjectiveCode Value: قانون موضوعي

Error: The resource object with key 'ObjectiveCode' was not found.

  • You said that the resource is in a module? And you are developing a sandbox solution? Could please post the configuration for the module? does it get deployed correctly? – BlueSoul Jan 29 '14 at 12:46
  • Yes resource file is in module and it is a sandbox solution. It is deployed correctly.<?xml version="1.0" encoding="utf-8"?> <ProjectItem Type="Microsoft.VisualStudio.SharePoint.Module" SupportedTrustLevels="All" SupportedDeploymentScopes="Web, Site" xmlns="schemas.microsoft.com/VisualStudio/2010/SharePointTools/…"> <Files> <ProjectItemFile Source="TestArabic.ar-SA.resx" Target="Test\Module1\" Type="AppGlobalResource" /> <ProjectItemFile Source="TestEnglish.en-US.resx" Target="Test\Module1\" Type="AppGlobalResource" /> </Files> </ProjectItem> – guhananth Jan 30 '14 at 8:41

You should place Resource file TestArabic.ar-SA.resx on the App_GlobalResources folder of your web App by default :


PS : do not forget to add a default resource file TestArabic.resx

|improve this answer|||||
  • I have the TestArabic.resx in Resource folder and also placed it in C:\inetpub\wwwroot\wss\VirtualDirectories\<port_number>\App_GlobalResources . Now it says "The resource file '/App_GlobalResources/TestArabic.ar-SA.resx' cannot be used, as it conflicts with another file with the same name" – guhananth Jan 30 '14 at 3:39
  • try to remove the TestArabic.resx in Resource folder – Nizar Grindi Feb 1 '14 at 0:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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