Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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" />
share|improve this question
add comment

1 Answer

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!

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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