Skip to content

SharePoint JavaScript Resources and Localization

Great article from Wictor Wilén regarding that topic: Announcing new Visual Studio 2012 tool for JavaScript Localization in SharePoint 2013

Short sample code:

function requestUserPolicyDialog() {
    SP.SOD.executeFunc("sp.core.js", null, onSpCoreReady);

function onSpCoreReady() {
    SP.SOD.executeFunc("sp.js", null, onSpReady);

function onSpReady() {
    SP.SOD.registerSod("MyStrings", "/_layouts/15/ScriptResx.ashx?name=MyStrings&culture=" + STSHtmlEncode(Strings.STS.L_CurrentUICulture_Name));
    SP.SOD.executeFunc("MyStrings", "Res", onResourcesReady);

function onResourcesReady() {

Leave a Reply

Your email address will not be published. Required fields are marked *

By transmitting your comment you agree to our mentioned privacy policy content.

ten + 10 =