i18ns

package
v0.0.0-...-6797358 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBundle

func NewBundle(defaultLanguage language.Tag, messageFiles ...string) *i18n.Bundle

Types

type I18n

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

type LocalMessage

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

func NewLocalMessages

func NewLocalMessages(bundle *i18n.Bundle, langs ...string) *LocalMessage

func (*LocalMessage) Get

func (s *LocalMessage) Get(messageID string, args ...interface{}) string

Get messageID args can be, 1. empty, 2.map[string]interface, 3. multple args like Get(id, "name","jim" , "age" , 1)

func (*LocalMessage) GetPlural

func (s *LocalMessage) GetPlural(messageID string, count int, args ...interface{}) string

Jump to

Keyboard shortcuts

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