Class TlumachScriptObjectExtensions
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
scriptObjectScriptObjectThe script object to add the functions to.
managerTranslationManagerThe translation manager to take the translations from.
optionsTlumachScribanOptionsThe options, or null for the defaults.
Returns
- ScriptObject
scriptObject.