我有迄今为止似乎是一个相当独特的问题。我们正在运行多语言SharePoint 2010环境,英文作为默认语言和法语作为辅助。我们在方差关系中设置了网站,但我正在讨论的问题也发生在变体之外。

我们在Variant外(但在集合中)创建了一个库,所以两个站点必须共享。列表视图Web部件是通过Designer创建的,以添加到每个站点以便在列表中提供快速视图。如果我们在LIBRARY并切换到法语中,则更新列标签,它将记住设置(由于资源文件)并将其维护,因为语言可以来回翻转。它不起作用的情况下,在变体中的Web部分或语言不同。

如果语言是不同的,则将框中列出的工作查找,但自定义列(所有站点列不是库\列表列)仍然是英语标签。如果在浏览器语言更改的变体或外部,则无关紧要。它总是恢复到英语。它就像它不使用列表本身中使用的相同资源文件。

我创建了一个自定义视图并使用xslt修改它,如如何更改视图的列标题,但不会修改列表?,但这仅在列表中工作,也没有在列表视图中发生。

我不能是第一个遇到它的第一个,要么我不正确地表演我的搜索,没有人记录过这个问题,或者这是我们只是无法使用OOTB工具来修复。这是另一件事,解决方案必须完成OOTB或轻微的客户端改变。我无法触发Visual Studio,因为他们正在驾驶办公室365,并为迁移提出“没有自定义代码”,因为迁移(这对我来说真的很难。我喜欢我的代码; p)。

事先谢谢。

有帮助吗?

解决方案

Ok, I have come up with a solution. I edited the XSLT for the web part on the page. I did the following:

  1. Create the variants in the Site Ccollection
  2. Create the library outside of the variants.
  3. Add all the columns you require for the library. It is very important all the columns are there before you move on.
  4. Create a French and English view.
  5. Create the list view web part via designer.
  6. Add the list view web part to each site selecting the appropriate view to use.
  7. Edit the page in SharePoint Designer 2010.
  8. Place cursor in the column you wish to modify.
  9. Click Design in the List View Tools on the ribbon.
  10. Then click Customize XSLT and select Customize Item. Select this option otherwise you will generate a LOT of unnecessary XSL code.
  11. You are looking for a piece that resembles the following:

    <xsl:with-param name="fieldtitle">
      <xsl:value-of select="@DisplayName"/>
    </xsl:with-param>
    
  12. Modify it by typing in the actual column name you want. You should end up with something like this:

    <xsl:with-param name="fieldtitle">
      New Column Name.
    </xsl:with-param>
    
  13. Now, for this page only, the column will be renamed.

There are some caveats:

  1. Doesn’t appear to work in a publishing portal. I think this has to do with how SP stores the pages in this case. In a publishing portal you can only modify the page layout which won’t work as we need to modify the content.
  2. If you add another column, you will need to repeat the XSLT modification

Anyways, I hope this helps out any others with the same issue or need as I had.

许可以下: CC-BY-SA归因
scroll top