Table of Contents

Class TlumachScribanOptions

Namespace
Tlumach.Scriban
Assembly
Tlumach.Scriban.dll

The options of the Scriban integration, set up by ImportTlumach(ScriptObject, TranslationManager, TlumachScribanOptions?).

public sealed class TlumachScribanOptions : TemplateTranslationOptions
Inheritance
TlumachScribanOptions
Inherited Members

Properties

FunctionName

Gets or sets the name of the function that returns a translation as text. The default is "t".

public string FunctionName { get; set; }

Property Value

string

HtmlEncode

Gets or sets a value indicating whether the function named by FunctionName HTML-encodes its result. The default is false, because Scriban does not encode output and templates encode text with html.escape.

public bool HtmlEncode { get; set; }

Property Value

bool

HtmlEncoder

Gets or sets the encoder used when HtmlEncode is set and for the values in the function named by MarkupFunctionName. The default, Default, encodes all characters outside Basic Latin; use HtmlEncoder.Create(UnicodeRanges.All) to keep them.

public HtmlEncoder HtmlEncoder { get; set; }

Property Value

HtmlEncoder

MarkupFunctionName

Gets or sets the name of the function that returns a translation, which contains trusted HTML, with HTML-encoded values. The default is "t_html". null or an empty string means the function is not registered.

public string? MarkupFunctionName { get; set; }

Property Value

string