translation

package
v0.0.0-...-5722567 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetDefaultTranslation

func SetDefaultTranslation(language string) error

SetDefaultTranslation sets the default language to the provided one. Does nothing if it returns error != nil.

Types

type Translation

type Translation struct {
	Language                           string
	Subject                            string
	Message                            string
	PublishAnnouncement                string
	AnnouncementPublished              string
	PublishedAnnouncements             string
	Login                              string
	Logout                             string
	Password                           string
	CreatedBy                          string
	Impressum                          string
	PrivacyPolicy                      string
	AcceptPrivacyPolicy                string
	History                            string
	Back                               string
	CaptchaTextBefore                  string
	CaptchaTextAfter                   string
	DeleteMessages                     string
	BotAnswerMessage                   string
	BotSendOnThisChannel               string
	BotUserGreetings                   string
	RegisterMailRegister               string
	RegisterMailRegisterCaptchaFailure string
	RegisterMailRegisterNow            string
	RegisterMailRegisterSuccess        string
	RegisterMailValidationSuccess      string
	RegisterMailUnregister             string
	RegisterMailUnregisterSuccessful   string
	RegisterMailRegistrationClosed     string
	RegisterMailEMail                  string
	RegisterMailCaptcha                string
}

Translation represents an object holding all translations

func GetDefaultTranslation

func GetDefaultTranslation() Translation

GetDefaultTranslation returns a Translation struct of the current default language.

func GetTranslation

func GetTranslation(language string) (Translation, error)

GetTranslation returns a Translation struct of the given language. This function always loads translations from disk. Try to use GetDefaultTranslation where possible.

Jump to

Keyboard shortcuts

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