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

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!

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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