namespace Microsoft.Extensions.Localization { public static class OqtaneLocalizationExtensions { /// /// Gets the string resource for the specified key and returns the value if the resource does not exist /// /// /// the static key used to identify the string resource /// the default value if the resource for the static key does not exist /// public static string GetString(this IStringLocalizer localizer, string key, string value) { string localizedValue = localizer[key]; if (localizedValue == key && !string.IsNullOrEmpty(value)) // not localized { localizedValue = value; } return localizedValue; } } }