language

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: GPL-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 added in v0.6.0

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) TextAccount

func (l *Localizer) TextAccount() *LocalizedString

TextAccount returns a translated phrase.

func (*Localizer) TextAccounts added in v0.6.0

func (l *Localizer) TextAccounts() *LocalizedString

TextAccounts returns a translated phrase.

func (*Localizer) TextActivityLog

func (l *Localizer) TextActivityLog() *LocalizedString

TextActivityLog returns a translated phrase.

func (*Localizer) TextActorURI

func (l *Localizer) TextActorURI() *LocalizedString

TextActorURI returns a translated phrase.

func (*Localizer) TextAddBlock

func (l *Localizer) TextAddBlock() *LocalizedString

TextAddBlock returns a translated phrase.

func (*Localizer) TextAdmin

func (l *Localizer) TextAdmin() *LocalizedString

TextAdmin returns a translated phrase.

func (*Localizer) TextAllowSearchEngineIndexing added in v0.5.0

func (l *Localizer) TextAllowSearchEngineIndexing() *LocalizedString

TextAllowSearchEngineIndexing returns a translated phrase.

func (*Localizer) TextBlock

func (l *Localizer) TextBlock() *LocalizedString

TextBlock returns a translated phrase.

func (*Localizer) TextBlockExistsDomain

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

TextBlockExistsDomain returns a translated phrase.

func (*Localizer) TextBlockSubdomains added in v0.5.8

func (l *Localizer) TextBlockSubdomains() *LocalizedString

TextBlockSubdomains returns a translated phrase.

func (*Localizer) TextBlocked

func (l *Localizer) TextBlocked() *LocalizedString

TextBlocked returns a translated phrase.

func (*Localizer) TextBlockedDomains added in v0.5.8

func (l *Localizer) TextBlockedDomains() *LocalizedString

TextBlockedDomains returns a translated phrase.

func (*Localizer) TextBlocks added in v0.6.0

func (l *Localizer) TextBlocks() *LocalizedString

TextBlocks returns a translated phrase.

func (*Localizer) TextChatID

func (l *Localizer) TextChatID() *LocalizedString

TextChatID returns a translated phrase.

func (*Localizer) TextClose

func (l *Localizer) TextClose() *LocalizedString

TextClose returns a translated phrase.

func (*Localizer) TextConfiguration added in v0.5.8

func (l *Localizer) TextConfiguration() *LocalizedString

TextConfiguration returns a translated phrase.

func (*Localizer) TextContact added in v0.7.0

func (l *Localizer) TextContact() *LocalizedString

TextContact returns a translated phrase.

func (*Localizer) TextContactFor added in v0.7.0

func (l *Localizer) TextContactFor() *LocalizedString

TextContactFor returns a translated phrase.

func (*Localizer) TextCreate

func (l *Localizer) TextCreate() *LocalizedString

TextCreate returns a translated phrase.

func (*Localizer) TextDayCount added in v0.5.8

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

TextDayCount 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) TextDeliveredActivities added in v0.5.8

func (l *Localizer) TextDeliveredActivities() *LocalizedString

TextDeliveredActivities 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) 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) TextHowToJoinActor added in v0.5.8

func (l *Localizer) TextHowToJoinActor() *LocalizedString

TextHowToJoinActor returns a translated phrase.

func (*Localizer) TextHowToJoinInbox added in v0.5.8

func (l *Localizer) TextHowToJoinInbox() *LocalizedString

TextHowToJoinInbox returns a translated phrase.

func (*Localizer) TextImport

func (l *Localizer) TextImport() *LocalizedString

TextImport returns a translated phrase.

func (*Localizer) TextImportBlockList

func (l *Localizer) TextImportBlockList() *LocalizedString

TextImportBlockList returns a translated phrase.

func (*Localizer) TextInboxURI

func (l *Localizer) TextInboxURI() *LocalizedString

TextInboxURI returns a translated phrase.

func (*Localizer) TextInstance

func (l *Localizer) TextInstance() *LocalizedString

TextInstance returns a translated phrase.

func (*Localizer) TextInstances added in v0.6.0

func (l *Localizer) TextInstances() *LocalizedString

TextInstances returns a translated phrase.

func (*Localizer) TextJob added in v0.6.0

func (l *Localizer) TextJob() *LocalizedString

TextJob returns a translated phrase.

func (*Localizer) TextJobRunning added in v0.7.0

func (l *Localizer) TextJobRunning(job string) *LocalizedString

TextJobRunning returns a translated phrase.

func (*Localizer) TextJobs added in v0.6.0

func (l *Localizer) TextJobs() *LocalizedString

TextJobs returns a translated phrase.

func (*Localizer) TextKick added in v0.7.0

func (l *Localizer) TextKick() *LocalizedString

TextKick returns a translated phrase.

func (*Localizer) TextKickInstance added in v0.7.0

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

TextKickInstance returns a translated phrase.

func (*Localizer) TextKickInstanceConfirm added in v0.7.0

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

TextKickInstanceConfirm returns a translated phrase.

func (*Localizer) TextLastError added in v0.7.0

func (l *Localizer) TextLastError() *LocalizedString

TextLastError returns a translated phrase.

func (*Localizer) TextLastRun added in v0.6.0

func (l *Localizer) TextLastRun() *LocalizedString

TextLastRun returns a translated phrase.

func (*Localizer) TextLinear added in v0.5.7

func (l *Localizer) TextLinear() *LocalizedString

TextLinear returns a translated phrase.

func (*Localizer) TextLogarithmic added in v0.5.7

func (l *Localizer) TextLogarithmic() *LocalizedString

TextLogarithmic 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) TextMetrics added in v0.5.8

func (l *Localizer) TextMetrics() *LocalizedString

TextMetrics returns a translated phrase.

func (*Localizer) TextModerator

func (l *Localizer) TextModerator() *LocalizedString

TextModerator returns a translated phrase.

func (*Localizer) TextNextRun added in v0.6.0

func (l *Localizer) TextNextRun() *LocalizedString

TextNextRun returns a translated phrase.

func (*Localizer) TextNotifications added in v0.6.0

func (l *Localizer) TextNotifications() *LocalizedString

TextNotifications returns a translated phrase.

func (*Localizer) TextOAuthConfigured

func (l *Localizer) TextOAuthConfigured() *LocalizedString

TextOAuthConfigured returns a translated phrase.

func (*Localizer) TextObfuscatedDomain

func (l *Localizer) TextObfuscatedDomain() *LocalizedString

TextObfuscatedDomain returns a translated phrase.

func (*Localizer) TextPaused added in v0.6.0

func (l *Localizer) TextPaused() *LocalizedString

TextPaused returns a translated phrase.

func (*Localizer) TextProblemRunningJob added in v0.7.0

func (l *Localizer) TextProblemRunningJob(job, errStr string) *LocalizedString

TextProblemRunningJob returns a translated phrase.

func (*Localizer) TextReceivedActivities added in v0.5.8

func (l *Localizer) TextReceivedActivities() *LocalizedString

TextReceivedActivities returns a translated phrase.

func (*Localizer) TextRelay

func (l *Localizer) TextRelay() *LocalizedString

TextRelay returns a translated phrase.

func (*Localizer) TextRepo

func (l *Localizer) TextRepo() *LocalizedString

TextRepo returns a translated phrase.

func (*Localizer) TextRunCount added in v0.7.0

func (l *Localizer) TextRunCount() *LocalizedString

TextRunCount returns a translated phrase.

func (*Localizer) TextRunJob added in v0.6.0

func (l *Localizer) TextRunJob() *LocalizedString

TextRunJob returns a translated phrase.

func (*Localizer) TextRunning added in v0.6.0

func (l *Localizer) TextRunning() *LocalizedString

TextRunning returns a translated phrase.

func (*Localizer) TextSave

func (l *Localizer) TextSave() *LocalizedString

TextSave returns a translated phrase.

func (*Localizer) TextServerHostname

func (l *Localizer) TextServerHostname() *LocalizedString

TextServerHostname returns a translated phrase.

func (*Localizer) TextSettings added in v0.5.8

func (l *Localizer) TextSettings() *LocalizedString

TextSettings returns a translated phrase.

func (*Localizer) TextSoftware

func (l *Localizer) TextSoftware() *LocalizedString

TextSoftware returns a translated phrase.

func (*Localizer) TextStatistics added in v0.5.8

func (l *Localizer) TextStatistics() *LocalizedString

TextStatistics returns a translated phrase.

func (*Localizer) TextTimestamp

func (l *Localizer) TextTimestamp() *LocalizedString

TextTimestamp returns a translated phrase.

func (*Localizer) TextTitle added in v0.7.0

func (l *Localizer) TextTitle() *LocalizedString

TextTitle returns a translated phrase.

func (*Localizer) TextToken

func (l *Localizer) TextToken() *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() *LocalizedString

TextUpdate returns a translated phrase.

func (*Localizer) TextVersion added in v0.7.0

func (l *Localizer) TextVersion() *LocalizedString

TextVersion 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