Class TlumachHtmlHelperExtensions
- Namespace
- Tlumach.AspNetCore.Mvc
- Assembly
- Tlumach.AspNetCore.Mvc.dll
Renders translation units in views without @Html.Raw: @Html.Tlumach(Strings.Home.Intro, Model.Name).
The translation is trusted HTML; values are HTML-encoded, except IHtmlContent values. WebEncodeValues does not affect the output. Values cached on the unit or supplied by OnPlaceholderValueNeeded are used for placeholders without a value; they are shared by all requests.
public static class TlumachHtmlHelperExtensions
- Inheritance
-
TlumachHtmlHelperExtensions
- Inherited Members
Methods
Tlumach(IHtmlHelper, BaseTranslationUnit)
Renders the unit in the current culture.
public static IHtmlContent Tlumach(this IHtmlHelper htmlHelper, BaseTranslationUnit unit)
Parameters
htmlHelperIHtmlHelperThe HTML helper of the view.
unitBaseTranslationUnitThe translation unit.
Returns
- IHtmlContent
The HTML.
Tlumach(IHtmlHelper, BaseTranslationUnit, IReadOnlyDictionary<string, object?>)
Renders the unit in the current culture with named values.
public static IHtmlContent Tlumach(this IHtmlHelper htmlHelper, BaseTranslationUnit unit, IReadOnlyDictionary<string, object?> values)
Parameters
htmlHelperIHtmlHelperThe HTML helper of the view.
unitBaseTranslationUnitThe translation unit.
valuesIReadOnlyDictionary<string, object>The values of the placeholders, by name.
Returns
- IHtmlContent
The HTML.
Tlumach(IHtmlHelper, BaseTranslationUnit, params object?[])
Renders the unit in the current culture with positional values.
public static IHtmlContent Tlumach(this IHtmlHelper htmlHelper, BaseTranslationUnit unit, params object?[] arguments)
Parameters
htmlHelperIHtmlHelperThe HTML helper of the view.
unitBaseTranslationUnitThe translation unit.
argumentsobject[]The values of the placeholders, by position.
Returns
- IHtmlContent
The HTML.