1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-23 20:05:59 +00:00

New: i18n pluralization and variables support and more...

fixes: #1649, #1648, #1641, #1650

relative to: #1597
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-09-29 19:19:19 +03:00
parent f224ded740
commit 4065819688
63 changed files with 2054 additions and 684 deletions

View File

@@ -4,11 +4,15 @@ import "io"
// ViewEngine is the interface which all view engines should be implemented in order to be registered inside iris.
type ViewEngine interface {
// Load should load the templates from a physical system directory or by an embedded one (assets/go-bindata).
// Name returns the name of the engine.
Name() string
// Load should load the templates from the given FileSystem.
Load() error
// ExecuteWriter should execute a template by its filename with an optional layout and bindingData.
ExecuteWriter(w io.Writer, filename string, layout string, bindingData interface{}) error
// Ext should return the final file extension which this view engine is responsible to render.
// Ext should return the final file extension (including the dot)
// which this view engine is responsible to render.
// If the filename extension on ExecuteWriter is empty then this is appended.
Ext() string
}