Using resource files for Web Template:
- How to add a localized Title to a list instance?
- How to add a localized Title to a web part added in ONET.XML?
- how to add localized terms in a CEWP contents added in ONET.XML?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
Add the mapped folder called
RESOURCES to you solution and then add you resx files there.
If you want to add your resx files in the App_GlobalResource folder in the IIS, then add an
Empty Element to you solution, add your resx files to that and modify the SharePointSolutionItem.spdata to target the App_GlobalResource folder like so:
<?xml version="1.0" encoding="utf-8"?> <ProjectItem Type="Microsoft.VisualStudio.SharePoint.GenericElement" DefaultFile="Elements.xml" SupportedTrustLevels="All" SupportedDeploymentScopes="Web, Site, WebApplication, Farm, Package" xmlns="http://schemas.microsoft.com/VisualStudio/2010/SharePointTools/SharePointProjectItemModel"> <Files> <ProjectItemFile Source="Elements.xml" Target="App_GlobalResources\" Type="ElementManifest" /> <ProjectItemFile Source="..\Resources\Contoso.resx" Type="AppGlobalResource"/> </Files> </ProjectItem>
Then make sure there is a Feature which contains that
Empty Element and that the Feature has its scope to WebApplication.
Create new "Import SharePoint Solution Package" from Installed templates project and select your web template that you import from sharepoint than add resource file to your solution: