Localize section component

This commit is contained in:
hishamco 2020-10-24 10:05:57 +03:00
parent af41e8bcfb
commit 5948e7ba76

View File

@ -1,5 +1,5 @@
@namespace Oqtane.Modules.Controls
@inherits ModuleControlBase
@namespace Oqtane.Modules.Controls
@inherits LocalizableComponent
<div class="d-flex">
<div>
@ -41,4 +41,16 @@
_heading = (!string.IsNullOrEmpty(Heading)) ? Heading : Name;
_expanded = (!string.IsNullOrEmpty(Expanded)) ? Expanded : "false";
}
protected override void OnParametersSet()
{
base.OnParametersSet();
if (IsLocalizable)
{
_heading = !string.IsNullOrEmpty(Heading)
? Localize(nameof(Heading))
: Localize(nameof(Name));
}
}
}