localize

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Messages []i18n.Message = []i18n.Message{
		{
			ID:    "PageNumberWithTotalCount",
			Other: "Page {{.PageNumber}} from {{.PageCount}}",
		},
		{
			ID:    "InvoiceNumber",
			Other: "Invoice no.",
		},
		{
			ID:    "Date",
			Other: "Date",
		},
		{
			ID:    "OfferNumber",
			Other: "Offer no.",
		},
		{
			ID:    "DueDate",
			Other: "Due date",
		},
		{
			ID:    "CustomerIdentifier",
			Other: "Customer Number",
		},
		{
			ID:    "Name",
			Other: "Name",
		},
		{
			ID:    "Amount",
			Other: "Amount",
		},
		{
			ID:    "Net",
			Other: "Net",
		},
		{
			ID:    "Tax",
			Other: "Tax",
		},
		{
			ID:    "Discount",
			Other: "Discount",
		},
		{
			ID:    "Gross",
			Other: "Gross",
		},
		{
			ID:    "PaymentReference",
			Other: "Payment-Reference",
		},
		{
			ID:    "RemittanceInformation",
			Other: "Transaction-Text",
		},
		{
			ID:    "ContractingParty",
			Other: "Contracting Party",
		},
	}
)

Messages

Functions

This section is empty.

Types

type Config

type Config struct {
	//the language keys separated by comma, all small
	LangKeys string `env:"LANGUAGE_KEYS"`
}

func (*Config) LocalizeServiceConfig

func (c *Config) LocalizeServiceConfig() *Config

type LocalizeClient

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

func (*LocalizeClient) FFloat32

func (client *LocalizeClient) FFloat32(data float32) string

func (*LocalizeClient) FFloat64

func (client *LocalizeClient) FFloat64(data float64) string

func (*LocalizeClient) FInt

func (client *LocalizeClient) FInt(data int) string

func (*LocalizeClient) TranslateAmount

func (client *LocalizeClient) TranslateAmount() string

func (*LocalizeClient) TranslateContractingParty

func (client *LocalizeClient) TranslateContractingParty() string

func (*LocalizeClient) TranslateCustomerIdentifier

func (client *LocalizeClient) TranslateCustomerIdentifier() string

func (*LocalizeClient) TranslateDate

func (client *LocalizeClient) TranslateDate() string

func (*LocalizeClient) TranslateDiscount

func (client *LocalizeClient) TranslateDiscount() string

func (*LocalizeClient) TranslateDueDate

func (client *LocalizeClient) TranslateDueDate() string

func (*LocalizeClient) TranslateGross

func (client *LocalizeClient) TranslateGross() string

func (*LocalizeClient) TranslateInvoiceNumber

func (client *LocalizeClient) TranslateInvoiceNumber() string

func (*LocalizeClient) TranslateName

func (client *LocalizeClient) TranslateName() string

func (*LocalizeClient) TranslateNet

func (client *LocalizeClient) TranslateNet() string

func (*LocalizeClient) TranslateOfferNumber

func (client *LocalizeClient) TranslateOfferNumber() string

func (*LocalizeClient) TranslatePageNumberWithTotalCount

func (client *LocalizeClient) TranslatePageNumberWithTotalCount(pageNumber int, pageCount string) string

func (*LocalizeClient) TranslatePaymentReference

func (client *LocalizeClient) TranslatePaymentReference() string

func (*LocalizeClient) TranslateRemittanceInformation

func (client *LocalizeClient) TranslateRemittanceInformation() string

func (*LocalizeClient) TranslateTax

func (client *LocalizeClient) TranslateTax() string

type LocalizeService

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

func NewLocalizeService

func NewLocalizeService(config *Config) *LocalizeService

NewLogger creates a new logger with the given configuration.

func (*LocalizeService) CreateClient

func (service *LocalizeService) CreateClient(locale string, preferedLangs ...string) *LocalizeClient

Jump to

Keyboard shortcuts

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