The other day a colleague was asking about the sc_lang query string parameter and how Sitecore knows to use that for the language. The conversation was seeking answers to the following questions:

  • What are all the ways in which Sitecore determines which language to use?
  • What is the order of priority for each method in relation to the other?
  • Is there a way to include other procedures to determine the language?
  • 2
    Hey Michael have you checked this post? community.sitecore.net/technical_blogs/b/sitecorejohn_blog/…
    – Diego
    Oct 30, 2017 at 13:48
  • Thank you. No I've not seen that article. Does it still hold true for Sitecore 9? Oct 30, 2017 at 13:50
  • Not sure to be honest. It was valid for previous versions though
    – Diego
    Oct 30, 2017 at 13:52
  • Nothing in the release notes suggest that this part of the codebase has changed in any way.
    – jammykam
    Oct 30, 2017 at 13:52

1 Answer 1


I think this is well covered on John West's post which in summary describes what the priority is and how Sitecore handles them:

"The Sitecore layout engine retrieves content from the Sitecore repository in the context language (Sitecore.Context.Language). The default logic to determine the context language is to use the first of these variables that specifies a value:

  1. The sc_lang query string parameter.


  2. The language prefix in the path in the requested URL.


  3. The language cookie associated with the context site.


  4. The default language associated with the context logical site.
<site name="company" patch:before="site[@name='website']" 
    virtualFolder="/" physicalFolder="/" 
    rootPath="/sitecore/content/company" language="en" 
    hostName="www.company.com" />
  1. The DefaultLanguage setting specified in web.config.
<setting name="DefaultLanguage" value="en" />


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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