#2 CmsContext.Culture – Current Language etc.
Interface ICmsCulture
With this object you can get general information about the culture.
Output
The .CurrentCode attribute:
The current code culture is:
en-us
<h3>The .CurrentCode attribute:</h3>
The current code culture is:
<strong>
@CmsContext.Culture.CurrentCode
</strong>
Output
The .DefaultCode attribute:
The default culture for the system is:
en-us
<h3>The .DefaultCode attribute:</h3>
The default culture for the system is:
<strong>
@if (Text.Has(CmsContext.Culture.DefaultCode)) {
@CmsContext.Culture.DefaultCode
} else {
<p>
The system is single language and the response is an empty string.
</p>}
</strong>
#2 CmsContext.Culture – Current Language etc.
@inherits Custom.Hybrid.Razor14
@using ToSic.Razor.Blade;
<!-- unimportant stuff, hidden -->
<div @Sys.PageParts.InfoWrapper()>
@Html.Partial("../shared/DefaultInfoSection.cshtml")
<div @Sys.PageParts.InfoIntro()>
<h2>Interface ICmsCulture</h2>
<p>
With this object you can get general information about the culture.
</p>
</div>
</div>
<h3>The .CurrentCode attribute:</h3>
The current code culture is:
<strong>
@CmsContext.Culture.CurrentCode
</strong>
<h3>The .DefaultCode attribute:</h3>
The default culture for the system is:
<strong>
@if (Text.Has(CmsContext.Culture.DefaultCode)) {
@CmsContext.Culture.DefaultCode
} else {
<p>
The system is single language and the response is an empty string.
</p>}
</strong>
@* Footer *@
@Html.Partial("../Shared/Layout/FooterWithSource.cshtml", new { Sys = Sys })