2

how to localize listInstance title in sandboxed solution?

It is posible to add Resources.resx file to feature and localize ListDefinition:

<ListTemplate
        Name="TagsListDefinition"
        Type="20020"
        BaseType="0"
        OnQuickLaunch="TRUE"
        SecurityBits="11"
        Sequence="410"
        DisplayName="$Resources:TagsListDefinitionDisplayName"
        Description="$Resources:TagsListDefinitionDescription"
        Category="Communications"
        Image="/_layouts/images/itgen.png"/>

But this don't work for ListInstance

<ListInstance Title="$Resources:TagsListInstanceTitle"
                OnQuickLaunch="TRUE"
                TemplateType="20020"
                Url="Lists/Tags"
                Description="descr" />

1 Answer 1

1

Make sure your format to pick the name from the Resource file is:

Name="$Resources:MyResources,TagsListInstanceTitle"
MyResources – name of the resources file (as described below)
TagsListInstanceTitle – the resource entry

And the name of Resources file (for the entry above) for English should be:

MyResources.en-US.resx

And deployed to:

{SharePointRoot aka 14 hive}Resources

For SandBox solutions:

You need to use Embedded Resource files. An Embedded Resource is compiled directly into the output assembly. See the link about the their usage

Hope it helps!

3
  • Falak, thanks. Your solution dosn't work in sandboxed solutions. May 28, 2012 at 11:10
  • you need to use Embedded Resource files see my updated response. Jun 10, 2012 at 17:34
  • 1
    Embedded Resource don't work in this scenario. Do you test it? Jun 21, 2012 at 11:11

Your Answer

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

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