多言語サイト用のリストビューWebパーツのカスタム列は、カスタム言語ラベルを使用しません。デフォルトの言語で滞在します
質問
私はこれまでのところかなり独特の問題であると思われるものを持っています。デフォルトの言語とフランス語として、英語で多言語SharePoint 2010環境を実行しています。私たちは分散関係の中でサイトを設定しましたが、私が議論している問題もバリアントの外で起こります。
2つのサイトが共有しなければならないことをバリアントの外側にあるライブラリーを作成しました。リストにクイックビューを提供するために、Designerを介してリストビューWebパーツが各サイトに追加されました。ライブラリに入ってフランス語に切り替えてから、列ラベルを更新し、設定を記憶し(リソースファイルのせい)、言語が前後に反転されると維持します。うまくいかない場合は、バリアントのWebパーツとして、またはその言語が異なる場所です。
言語が異なる場合、ボックスの列が見つけられますが、カスタム列(Library \ List列ではないすべてのサイト列)は英語のラベルのままです。ブラウザの言語が変更されたバリアント内または外部の中には関係ありません。それは常に英語に戻ります。リスト自体で使用されていたのと同じリソースファイルを使用していないようなものです。
カスタムビューを作成し、XSLTでXSLTで変更しました。しかし、ビューの列タイトルを変更するには、リストを変更するには、リストを変更しないでください。はリスト内でのみ機能し、リストビューでも一覧表示されませんでした。
私はそれに遭遇した最初のものではありません、私は私の検索を正しく実行していない、誰もこれを修正したことがあるかそれが他のものです、解決策はOOTBまたはマイナーなクライアント側の変更を加えなければなりません。私はVisual Studioを起動することはできません。
事前にありがとうございました。
解決
Ok, I have come up with a solution. I edited the XSLT for the web part on the page. I did the following:
- Create the variants in the Site Ccollection
- Create the library outside of the variants.
- Add all the columns you require for the library. It is very important all the columns are there before you move on.
- Create a French and English view.
- Create the list view web part via designer.
- Add the list view web part to each site selecting the appropriate view to use.
- Edit the page in SharePoint Designer 2010.
- Place cursor in the column you wish to modify.
- Click Design in the List View Tools on the ribbon.
- Then click Customize XSLT and select Customize Item. Select this option otherwise you will generate a LOT of unnecessary XSL code.
You are looking for a piece that resembles the following:
<xsl:with-param name="fieldtitle"> <xsl:value-of select="@DisplayName"/> </xsl:with-param>
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>
Now, for this page only, the column will be renamed.
There are some caveats:
- 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.
- 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.