i18n

package
v0.4.0-el1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: GPL-3.0 Imports: 1 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoLocal = &noLocal{}

NoLocal is a i18.Localizer that performs no localization.

Functions

func InitLocalization

func InitLocalization(gx Localizer)

InitLocalization should be called before using localization - it sets the variable used to access the localization interface

func Local

func Local(v string) string

Local returns the given string in the local language

func Localf

func Localf(f string, p ...interface{}) string

Localf returns the given string in the local language. It supports Printf formatting.

Types

type Localizer

type Localizer interface {
	Local(string) string
}

Localizer represents something that can localize a string

Jump to

Keyboard shortcuts

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