Tag Info

Hot answers tagged

2

SPUtility.GetLocalizedString("$Resources:YourKeyValue", "Comp.Dept.Proj.Farm\\GloablResources", 1033); plz refer this link http://geekswithblogs.net/venkatx5/archive/2010/12/14/how-to-create-multilingual-webpart-in-sharepoint-2010.aspx


2

There are two ways to use resource file. In .ascx file: <asp:Label ID="lbl1" runat="server" Text="<%$Resources:ResourcesFileName, ResourceFileItemKey %>" And in .cs file use SPUtility.GetLocalizedString() method For the second option your resource file should be present in sharepoint mapped resources folder. For more details visit this link ...


2

How do you mean? Most of the resources files can be found under C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\Resources, and hence can be altered without deploying a solution. But it is probably wise to update your resources also in your solution, to prevent it from overwriting your changes on the next deploy


2

You can add the layouts mapped folder to your project and keep javascript and css files there.You can then use ScriptLink class to register the js and CssRegistration class to register the css in the Page_Load method of the webpart. Following is the example: private const string script = "/_layouts/JQuery/JS/jquery.min.js"; ScriptLink.Register(Page, script ...


1

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" ...


1

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: add Resource File project items to your project. If you do not have to localize code in addition to the markup, you can instead add Global Resources Files. Provide a name for ...


1

So, from the link mentioned in my comment above: <%= SPUtility.GetLocalizedString("$Resources:MyTitle", "MeResourceFile", Thread.CurrentThread.CurrentUICulture.LCID); %> http://social.msdn.microsoft.com/Forums/sharepoint/en-US/6d036f6a-d1e5-41ce-b5dc-f8a0060d0f5d/access-resource-file-from-page-layout


1

It can also be done in code behind OnInit function e.g., protected override void OnInit(EventArgs e) { base.OnInit(e); InitializeControl(); CultureInfo ci = SPContext.Current.Web.Locale; string url = string.Format("/_layouts/15/ScriptResx.ashx?name=MyResourceFile&culture={0}&rev={1}", ci.ToString(), ...


1

In SharePoint 2013 many (most?) of those strings are available either directly in JavaScript files (localized in folders such as Layouts\1033), or in culture-specific resource DLLs. Many of these DLLs are then loaded through the ScriptResx.ashx handler. For example, see these objects in JavaScript: SP.Res.* -> Loaded through ScriptResx.ashx Srch.Res.* -> ...



Only top voted, non community-wiki answers of a minimum length are eligible