Agility.Web.AgilityContext.LanguageCode Default Value

Posted by Dru Vagale on June 6, 2016

Does the Agility.Web.AgilityContext.LanguageCode method have a default value?

   0 people like this question
15 30 50   per page
   
  
 
 
   
Submit
Thanks!

Posted By: Dru Vagale

Hi Dru,

That would be correct. It should default to the whatever is set as the default language. 

Regards,
James
Posted By: James Vidler

Hi James,

Thanks for the prompt response. Need a bit more clarification.

Assuming we set
Settings > Site Configuration Settings > Language > English = "en-ca"
and, we set:
Settings > Content Manager Settings > Global Configuration > Default Language = "English"

Then in the context of using Agility API's directly which does not render a page, would the default value of AgilityContext.LanguageCode be "en-ca"?

Thanks!

Dru

Posted By: Dru Vagale

Hi Dru,

AgilityContext.LanguageCode will return the current language by default. If an Agility page is being routed, it will be populated automatically. It could be null if the current request does not match a Page in Agility. You may also set the value of the AgilityContext.Language code as well.

Regards,
James
Posted By: James Vidler

Previous Next

LOGIN

Log in with your Agility username and password or
register for the site




Log In

REGISTER












Register

FORGOT PASSWORD