Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TemplateStrings ¶
type TemplateStrings struct {
// contains filtered or unexported fields
}
func InitTemplateStrings ¶
func InitTemplateStrings(stringsDir string, fileExt string, defaultVariant string, otherVariants ...string) (*TemplateStrings, error)
Load the strings from the specified files into memory
func InitTemplateStringsFS ¶
func InitTemplateStringsFS(filesystem fs.FS, stringsDir string, fileExt string, defaultVariant string, otherVariants ...string) (*TemplateStrings, error)
Load the strings from the specified files using a file system into memory
func (*TemplateStrings) GetTemplateStringVariant ¶
func (ts *TemplateStrings) GetTemplateStringVariant(input ...string) (result string)
Get a string input: language, name or just name (uses default language)
func (*TemplateStrings) GetTemplateStringVariantFunc ¶
func (ts *TemplateStrings) GetTemplateStringVariantFunc() func(...string) string
Get a function to use in templates
Click to show internal directories.
Click to hide internal directories.