Global:Area.Lang

Version: - globalvalue  

Summary

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.

Settings

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

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

Examples

Outputting the template tag

@GetGlobalValue("Global:Area.Lang")

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

<!--@Global:Area.Lang-->

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