/// <summary> /// Gets all string resources including those for parent cultures. /// </summary> /// <param name="htmlLocalizer">The <see cref="IHtmlLocalizer"/>.</param> /// <returns>The string resources.</returns> public static IEnumerable <LocalizedString> GetAllStrings(this IHtmlLocalizer htmlLocalizer) { if (htmlLocalizer == null) { throw new ArgumentNullException(nameof(htmlLocalizer)); } return(htmlLocalizer.GetAllStrings(includeParentCultures: true)); }
/// <inheritdoc /> public IEnumerable <LocalizedString> GetAllStrings(bool includeParentCultures) { return(_htmlLocalizer.GetAllStrings(includeParentCultures)); }
/// <inheritdoc /> public virtual IEnumerable <LocalizedString> GetAllStrings(bool includeParentCultures) => _localizer.GetAllStrings(includeParentCultures);
/// <inheritdoc /> public IEnumerable <LocalizedString> GetAllStrings(bool includeAncestorCultures) => _localizer.GetAllStrings(includeAncestorCultures);
public static string GetAllStringsFromLocalizerToJson(IHtmlLocalizer htmlLocalizer) { return(htmlLocalizer.GetAllStrings() .ToDictionary(kv => kv.Name, kv => kv.Value) .ToCamelCasedJson()); }