سؤال

Has anyone managed to get the locale ID for the context of an instance of a Content Query Web Part in XSL, without extending the class?

DataViewWebParts have a Language parameter passed in, but CQWP doesn't have this.

Even if there's a way to pass in the LCID via the CommonViewFields somehow would make it accessable in the XSL...

(This is all for MOSS).

هل كانت مفيدة؟

المحلول

You can use ParameterBindings to this purpose.

<ParameterBinding Name="Language" Location="Resource(wss,language_value)" />

This will return "en-us" for English locale in xsl:param "Language". Also, you can pass whole resource values this way.

You can read more about this in Stefan Stanev's blog:

http://stefan-stanev-sharepoint-blog.blogspot.com/2010/09/xsltlistviewwebpart-contentbyquerywebpa.html

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى sharepoint.stackexchange
scroll top