i18n

package
v1.6.8 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Escape

func Escape(text string) string

Escape makes sure javascript and linked CSS is cleaned out. Only embedded CSS is allowed.

Types

type I18nResolver

type I18nResolver struct {
	RegexCache map[int]*regexp.Regexp
}

func (*I18nResolver) Resolve

func (i18nr *I18nResolver) Resolve(text string, args ...string) string

type UIParser

type UIParser struct {
	// contains filtered or unexported fields
}

UIParses takes key(first arg) and value(second arg) out of structures like: $t('verification.blockchain.hint.valid', 'The file {filename} is valid.', {filename: file.name})

func NewUIParser

func NewUIParser() *UIParser

func (*UIParser) Parse

func (me *UIParser) Parse(content []byte)

func (*UIParser) Translations

func (me *UIParser) Translations() map[string]string

Jump to

Keyboard shortcuts

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