Table of Contents

Class TlumachScriptObjectExtensions

Namespace
Tlumach.Scriban
Assembly
Tlumach.Scriban.dll

Registers the Tlumach functions in a Scriban Scriban.Runtime.ScriptObject.

public static class TlumachScriptObjectExtensions
Inheritance
TlumachScriptObjectExtensions
Inherited Members

Methods

ImportTlumach(ScriptObject, TranslationManager, TlumachScribanOptions?)

Adds the read-only functions t and t_html (names set by the options) that return translations from manager. Push the script object to a TemplateContext with PushGlobal, and push the culture of each render with PushCulture.

public static ScriptObject ImportTlumach(this ScriptObject scriptObject, TranslationManager manager, TlumachScribanOptions? options = null)

Parameters

scriptObject ScriptObject

The script object to add the functions to.

manager TranslationManager

The translation manager to take the translations from.

options TlumachScribanOptions

The options, or null for the defaults.

Returns

ScriptObject

scriptObject.