HandleBars
in package
This is a class that suports the HandleBars use cases in Tsugi
Table of Contents
Methods
- templateInclude() : mixed
- templateInclude - Include a handlebars template, dealing with i18n
- templateProcess() : mixed
- templateProcess - Process a handlebars template, dealing with i18n
Methods
templateInclude()
templateInclude - Include a handlebars template, dealing with i18n
public
static templateInclude(mixed $name) : mixed
This is a normal handlebars template except we can ask for a translation of text as follows:
... {{__ 'Hello world' }} ...
The i18n replacement will be handled in the server in the template. Single or Double quotes can be used.
Parameters
- $name : mixed
templateProcess()
templateProcess - Process a handlebars template, dealing with i18n
public
static templateProcess(mixed $template) : mixed
This is a normal handlebars template except we can ask for a translation of text as follows:
... {{__ 'Hello world' }} ...
The i18n replacement will be handled in the server in the template. Single or double quotes can be used.
Parameters
- $template : mixed