Version: - globalvalue  


Returns the 2 letter ISO language code for the current area, e.g. if you use English as language then the Lang tag is en.


The value is based on the Regional settings field for the website.

(Modules > Website > Website tab > Settings > Regional settings)


Outputting the template tag


Check if tag has a value

@if(!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Area.Lang"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ string storedTag = GetGlobalValue("Global:Area.Lang"); }

Outputting the template tag


Check if globalvalue has a value

<!--@If Defined(@Global:Area.Lang)--> Let's output this tag here: <strong><!--@Global:Area.Lang--></strong> <!--@EndIf(@Global:Area.Lang)-->