diff --git a/src/OrchardCore/OrchardCore.Localization.Core/PortableObject/PortableObjectStringLocalizer.cs b/src/OrchardCore/OrchardCore.Localization.Core/PortableObject/PortableObjectStringLocalizer.cs index 725f41f9a3d..68cd60e4284 100644 --- a/src/OrchardCore/OrchardCore.Localization.Core/PortableObject/PortableObjectStringLocalizer.cs +++ b/src/OrchardCore/OrchardCore.Localization.Core/PortableObject/PortableObjectStringLocalizer.cs @@ -37,7 +37,7 @@ public PortableObjectStringLocalizer( } /// - public LocalizedString this[string name] + public virtual LocalizedString this[string name] { get { @@ -53,7 +53,7 @@ public LocalizedString this[string name] } /// - public LocalizedString this[string name, params object[] arguments] + public virtual LocalizedString this[string name, params object[] arguments] { get { @@ -65,7 +65,7 @@ public LocalizedString this[string name] } /// - public IEnumerable GetAllStrings(bool includeParentCultures) + public virtual IEnumerable GetAllStrings(bool includeParentCultures) { var culture = CultureInfo.CurrentUICulture; @@ -78,7 +78,7 @@ public IEnumerable GetAllStrings(bool includeParentCultures) public IStringLocalizer WithCulture(CultureInfo culture) => this; /// - public (LocalizedString, object[]) GetTranslation(string name, params object[] arguments) + public virtual (LocalizedString, object[]) GetTranslation(string name, params object[] arguments) { if (name == null) { @@ -150,7 +150,7 @@ private IEnumerable GetAllStringsFromCultureHierarchy(CultureIn return allLocalizedStrings; } - private string GetTranslation(string[] pluralForms, CultureInfo culture, int? count) + protected string GetTranslation(string[] pluralForms, CultureInfo culture, int? count) { var dictionary = _localizationManager.GetDictionary(culture); @@ -170,7 +170,7 @@ private string GetTranslation(string[] pluralForms, CultureInfo culture, int? co return pluralForms[pluralForm]; } - private string GetTranslation(string name, string context, CultureInfo culture, int? count) + protected string GetTranslation(string name, string context, CultureInfo culture, int? count) { string translation = null; try