SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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).

share|improve this question
up vote 11 down vote accepted

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:

share|improve this answer
Excellent, this is exactly what I was after. Cheers! – James Love Apr 8 '11 at 17:34
This is great, however I can't find the Language_value key on the wss resource file, did you do it manually ? thanks – Renzo Apr 14 '11 at 12:16
no, it's ootb in my C:\inetpub\wwwroot\wss\VirtualDirectories\80\App_GlobalResources\wss.resx file. – Andrey Markeev Apr 14 '11 at 19:51
Yay!!!!!!! thankyou – BinaryJam Feb 12 '14 at 10:23

Your Answer


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.