HtmlLocalizerExtensions Class¶
Extension methods for Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer
.
- Namespace
Microsoft.AspNetCore.Mvc.Localization
- Assemblies
- Microsoft.AspNetCore.Mvc.Localization
Syntax¶
public class HtmlLocalizerExtensions
-
class
Microsoft.AspNetCore.Mvc.Localization.
HtmlLocalizerExtensions
Methods¶
-
GetAllStrings
(Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer)¶ Gets all string resources including those for parent cultures.
Arguments: htmlLocalizer (Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer) – The Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer
.Return type: System.Collections.Generic.IEnumerable<Microsoft.Extensions.Localization.LocalizedString> Returns: The string resources. public static IEnumerable<LocalizedString> GetAllStrings(this IHtmlLocalizer htmlLocalizer)
-
GetHtml
(Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer, System.String)¶ Gets the
Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString
resource for a specific name.Arguments: - htmlLocalizer (Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer) – The
Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer
. - name (System.String) – The key to use.
Return type: Returns: The
Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString
resource.public static LocalizedHtmlString GetHtml(this IHtmlLocalizer htmlLocalizer, string name)
- htmlLocalizer (Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer) – The
-
GetHtml
(Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer, System.String, System.Object[]) Gets the
Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString
resource for a specific name.Arguments: - htmlLocalizer (Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer) – The
Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer
. - name (System.String) – The key to use.
- arguments (System.Object<System.Object>[]) – The values to format the string with.
Return type: Returns: The
Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString
resource.public static LocalizedHtmlString GetHtml(this IHtmlLocalizer htmlLocalizer, string name, params object[] arguments)
- htmlLocalizer (Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer) – The
-