language

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: GPL-3.0 Imports: 7 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) 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) TextAccount

func (l *Localizer) TextAccount(count int) *LocalizedString

TextAccount returns a translated phrase.

func (*Localizer) TextActivity added in v0.4.1

func (l *Localizer) TextActivity(count int) *LocalizedString

TextActivity returns a translated phrase.

func (*Localizer) TextActivityLog

func (l *Localizer) TextActivityLog(count int) *LocalizedString

TextActivityLog returns a translated phrase.

func (*Localizer) TextActorURI

func (l *Localizer) TextActorURI(count int) *LocalizedString

TextActorURI returns a translated phrase.

func (*Localizer) TextAddBlock

func (l *Localizer) TextAddBlock(count int) *LocalizedString

TextAddBlock returns a translated phrase.

func (*Localizer) TextAdmin

func (l *Localizer) TextAdmin() *LocalizedString

TextAdmin returns a translated phrase.

func (*Localizer) TextBlock

func (l *Localizer) TextBlock(count int) *LocalizedString

TextBlock returns a translated phrase.

func (*Localizer) TextBlockExistsDomain

func (l *Localizer) TextBlockExistsDomain(domain string) *LocalizedString

TextBlockExistsDomain returns a translated phrase.

func (*Localizer) TextBlockSubdomain

func (l *Localizer) TextBlockSubdomain(count int) *LocalizedString

TextBlockSubdomain returns a translated phrase.

func (*Localizer) TextBlocked

func (l *Localizer) TextBlocked() *LocalizedString

TextBlocked returns a translated phrase.

func (*Localizer) TextBlockedDomain

func (l *Localizer) TextBlockedDomain(count int) *LocalizedString

TextBlockedDomain returns a translated phrase.

func (*Localizer) TextChatID

func (l *Localizer) TextChatID(count int) *LocalizedString

TextChatID returns a translated phrase.

func (*Localizer) TextClose

func (l *Localizer) TextClose() *LocalizedString

TextClose returns a translated phrase.

func (*Localizer) TextConfig

func (l *Localizer) TextConfig(count int) *LocalizedString

TextConfig returns a translated phrase.

func (*Localizer) TextCreate

func (l *Localizer) TextCreate() *LocalizedString

TextCreate returns a translated phrase.

func (*Localizer) TextDelete

func (l *Localizer) TextDelete() *LocalizedString

TextDelete returns a translated phrase.

func (*Localizer) TextDeleteBlockConfirmDomain

func (l *Localizer) TextDeleteBlockConfirmDomain(domain string) *LocalizedString

TextDeleteBlockConfirmDomain returns a translated phrase.

func (*Localizer) TextDeleteBlockDomain

func (l *Localizer) TextDeleteBlockDomain(domain string) *LocalizedString

TextDeleteBlockDomain returns a translated phrase.

func (*Localizer) TextDeliveredActivity added in v0.4.1

func (l *Localizer) TextDeliveredActivity(count int) *LocalizedString

TextDeliveredActivity returns a translated phrase.

func (*Localizer) TextDescription

func (l *Localizer) TextDescription(count int) *LocalizedString

TextDescription returns a translated phrase.

func (*Localizer) TextDomain

func (l *Localizer) TextDomain(count int) *LocalizedString

TextDomain returns a translated phrase.

func (*Localizer) TextEditBlockDomain

func (l *Localizer) TextEditBlockDomain(domain string) *LocalizedString

TextEditBlockDomain returns a translated phrase.

func (*Localizer) TextEnabled

func (l *Localizer) TextEnabled() *LocalizedString

TextEnabled returns a translated phrase.

func (*Localizer) TextErrorDatabase

func (l *Localizer) TextErrorDatabase() *LocalizedString

TextErrorDatabase returns a translated phrase.

func (*Localizer) TextFederation

func (l *Localizer) TextFederation() *LocalizedString

TextFederation returns a translated phrase.

func (*Localizer) TextFollowing

func (l *Localizer) TextFollowing() *LocalizedString

TextFollowing returns a translated phrase.

func (*Localizer) TextGeneral

func (l *Localizer) TextGeneral() *LocalizedString

TextGeneral returns a translated phrase.

func (*Localizer) TextHomePageBody

func (l *Localizer) TextHomePageBody() *LocalizedString

TextHomePageBody returns a translated phrase.

func (*Localizer) TextHomeWeb

func (l *Localizer) TextHomeWeb() *LocalizedString

TextHomeWeb returns a translated phrase.

func (*Localizer) TextHowToJoin

func (l *Localizer) TextHowToJoin() *LocalizedString

TextHowToJoin returns a translated phrase.

func (*Localizer) TextImport

func (l *Localizer) TextImport() *LocalizedString

TextImport returns a translated phrase.

func (*Localizer) TextImportBlockList

func (l *Localizer) TextImportBlockList(count int) *LocalizedString

TextImportBlockList returns a translated phrase.

func (*Localizer) TextInboxURI

func (l *Localizer) TextInboxURI(count int) *LocalizedString

TextInboxURI returns a translated phrase.

func (*Localizer) TextInstance

func (l *Localizer) TextInstance(count int) *LocalizedString

TextInstance 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) TextMetric

func (l *Localizer) TextMetric(count int) *LocalizedString

TextMetric returns a translated phrase.

func (*Localizer) TextModerator

func (l *Localizer) TextModerator(count int) *LocalizedString

TextModerator returns a translated phrase.

func (*Localizer) TextNotification

func (l *Localizer) TextNotification(count int) *LocalizedString

TextNotification returns a translated phrase.

func (*Localizer) TextOAuthConfigured

func (l *Localizer) TextOAuthConfigured() *LocalizedString

TextOAuthConfigured returns a translated phrase.

func (*Localizer) TextObfuscatedDomain

func (l *Localizer) TextObfuscatedDomain(count int) *LocalizedString

TextObfuscatedDomain returns a translated phrase.

func (*Localizer) TextReceivedActivity added in v0.4.1

func (l *Localizer) TextReceivedActivity(count int) *LocalizedString

TextReceivedActivity returns a translated phrase.

func (*Localizer) TextRelay

func (l *Localizer) TextRelay(count int) *LocalizedString

TextRelay returns a translated phrase.

func (*Localizer) TextRepo

func (l *Localizer) TextRepo(count int) *LocalizedString

TextRepo returns a translated phrase.

func (*Localizer) TextSave

func (l *Localizer) TextSave() *LocalizedString

TextSave returns a translated phrase.

func (*Localizer) TextServerHostname

func (l *Localizer) TextServerHostname(count int) *LocalizedString

TextServerHostname returns a translated phrase.

func (*Localizer) TextSetting

func (l *Localizer) TextSetting(count int) *LocalizedString

TextSetting returns a translated phrase.

func (*Localizer) TextSoftware

func (l *Localizer) TextSoftware() *LocalizedString

TextSoftware returns a translated phrase.

func (*Localizer) TextTimestamp

func (l *Localizer) TextTimestamp(count int) *LocalizedString

TextTimestamp returns a translated phrase.

func (*Localizer) TextToken

func (l *Localizer) TextToken(count int) *LocalizedString

TextToken returns a translated phrase.

func (*Localizer) TextUnauthorized

func (l *Localizer) TextUnauthorized() *LocalizedString

TextUnauthorized returns a translated phrase.

func (*Localizer) TextUpdate

func (l *Localizer) TextUpdate(count int) *LocalizedString

TextUpdate 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