i18n

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type I18n added in v1.3.0

type I18n struct {
	Path     string
	Language string
	Type     string
	Data     map[string]interface{}
	Source   map[string]interface{}
	Child    interface{}
}

I18n

func New added in v1.3.0

func New(prefixPath, language string, defaultType ...string) *I18n

New initialization

func (*I18n) Next added in v1.3.0

func (i18n *I18n) Next(name interface{}) *I18n

Next config

func (*I18n) SetLanguage added in v1.3.0

func (i *I18n) SetLanguage(language string)

SetLanguage language setting

func (*I18n) SetPath added in v1.3.0

func (i *I18n) SetPath(path string)

SetPath Language pack path

func (*I18n) T added in v1.3.0

func (i18n *I18n) T(key string, args ...interface{}) string

T language translation

func (*I18n) TOption added in v1.3.0

func (i18n *I18n) TOption(key string, language string, args ...interface{}) string

TOption Choose language translation

Jump to

Keyboard shortcuts

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