In farm solutions you can use resource files inside aspx-pages by deploying resx-files to the hive. MSDN have some documentation but there's no example for page layouts, just managed code which is deprecated in sandboxed solutions.

Is there a way to localize page layouts (html or aspx) in sandboxed solution without using managed code?

EDIT: I have added a request on uservoice, feel free to vote on it!

1 Answer 1


take a look at this article in MSDN. It'll outline to you the procedures and limitations about localizing Sandboxed solutoins (same applies to SP 2013):

Localization of Sandboxed Solutions in SharePoint 2010

  • 1
    I've created a satelite assembly added the namespace to a aspx page layout <%@ Import Namespace="LocalizePageLayout" %> and attempted to print it like <%= Properties.Resources.HelloWorld %>. I get the yellow screen of death saying "Code blocks are not allowed in this file.". Feb 10, 2014 at 10:59
  • Have you tried <asp:Literal runat="server" Text="<%$Resources:MyResources,Foo%>" />? Note that using a farm solution for localization breaks your sandboxed approach as you are not sandboxed anymore.
    – Dennis G
    Feb 10, 2014 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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