templatestrings

package module
Version: v0.0.0-...-cfa3bd3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2021 License: MIT Imports: 4 Imported by: 1

README

template-strings

Simple Go module to manage template translations

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 (*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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL