language

package
v0.0.0-...-0f594a8 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultLanguage = language.English

DefaultLanguage is the default language of the application.

Functions

This section is empty.

Types

type LocalizedString

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

LocalizedString contains a localized string.

func (*LocalizedString) Language

func (l *LocalizedString) Language() language.Tag

Language returns the language of the localized string.

func (*LocalizedString) Lower

func (l *LocalizedString) Lower() string

Lower returns the localized string in lower-case.

func (*LocalizedString) String

func (l *LocalizedString) String() string

String returns the localized string.

type Localizer

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

Localizer returns translated phrases.

func (*Localizer) TextAccounts

func (l *Localizer) TextAccounts() *LocalizedString

TextAccounts returns a translated phrase.

func (*Localizer) TextAdd

func (l *Localizer) TextAdd() *LocalizedString

TextAdd returns a translated phrase.

func (*Localizer) TextAddInstance

func (l *Localizer) TextAddInstance() *LocalizedString

TextAddInstance returns a translated phrase.

func (*Localizer) TextAddTag

func (l *Localizer) TextAddTag() *LocalizedString

TextAddTag returns a translated phrase.

func (*Localizer) TextAdmin

func (l *Localizer) TextAdmin() *LocalizedString

TextAdmin returns a translated phrase.

func (*Localizer) TextBlock

func (l *Localizer) TextBlock() *LocalizedString

TextBlock returns a translated phrase.

func (*Localizer) TextClose

func (l *Localizer) TextClose() *LocalizedString

TextClose returns a translated phrase.

func (*Localizer) TextConfiguration

func (l *Localizer) TextConfiguration() *LocalizedString

TextConfiguration returns a translated phrase.

func (*Localizer) TextDescription

func (l *Localizer) TextDescription() *LocalizedString

TextDescription returns a translated phrase.

func (*Localizer) TextDomain

func (l *Localizer) TextDomain() *LocalizedString

TextDomain returns a translated phrase.

func (*Localizer) TextErrorDatabase

func (l *Localizer) TextErrorDatabase() *LocalizedString

TextErrorDatabase returns a translated phrase.

func (*Localizer) TextForce

func (l *Localizer) TextForce() *LocalizedString

TextForce returns a translated phrase.

func (*Localizer) TextHomeWeb

func (l *Localizer) TextHomeWeb() *LocalizedString

TextHomeWeb returns a translated phrase.

func (*Localizer) TextInstance

func (l *Localizer) TextInstance() *LocalizedString

TextInstance returns a translated phrase.

func (*Localizer) TextInstances

func (l *Localizer) TextInstances() *LocalizedString

TextInstances returns a translated phrase.

func (*Localizer) TextLogin

func (l *Localizer) TextLogin() *LocalizedString

TextLogin returns a translated phrase.

func (*Localizer) TextLogout

func (l *Localizer) TextLogout() *LocalizedString

TextLogout returns a translated phrase.

func (*Localizer) TextLooksGood

func (l *Localizer) TextLooksGood() *LocalizedString

TextLooksGood returns a translated phrase.

func (*Localizer) TextName

func (l *Localizer) TextName() *LocalizedString

TextName returns a translated phrase.

func (*Localizer) TextObfuscatedDomain

func (l *Localizer) TextObfuscatedDomain() *LocalizedString

TextObfuscatedDomain returns a translated phrase.

func (*Localizer) TextRepo

func (l *Localizer) TextRepo() *LocalizedString

TextRepo returns a translated phrase.

func (*Localizer) TextSettings

func (l *Localizer) TextSettings() *LocalizedString

TextSettings returns a translated phrase.

func (*Localizer) TextTags

func (l *Localizer) TextTags() *LocalizedString

TextTags returns a translated phrase.

func (*Localizer) TextUnauthorized

func (l *Localizer) TextUnauthorized() *LocalizedString

TextUnauthorized returns a translated phrase.

type Module

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

Module represent the language module for translating text.

func New

func New() (*Module, error)

New creates a new language module.

func (Module) Language

func (m Module) Language() language.Tag

Language returns the default language.

func (Module) NewLocalizer

func (m Module) NewLocalizer(langs ...string) (*Localizer, error)

NewLocalizer returns a localizer which will return translated phrases based on the provided languages.

Jump to

Keyboard shortcuts

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