Documentation ¶
Overview ¶
templ: version: v0.2.747
Package t wraps around i18n and l10n configuration.
Index ¶
- func L(a any) templ.Component
- func LC(a num.Amount, cur currency.Code) templ.Component
- func LCD(a num.Amount, cur currency.Code) templ.Component
- func LM(a num.Amount) templ.Component
- func Lang(ctx context.Context) gi18n.Lang
- func Localize(ctx context.Context, a any) string
- func LocalizeCurrency(_ context.Context, a num.Amount, cur currency.Code, ...) string
- func LocalizeMoney(ctx context.Context, a num.Amount) string
- func N(key string, n int, args ...any) templ.Component
- func Scope(key string) templ.Component
- func T(key string, args ...any) templ.Component
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func L ¶
L localizes a GOBL num.Amount, num.Percentage, cal.DateTime, or cal.Date according to the rules defined in the context.
func LC ¶
LC localizes and amount using the formatting defined by the specified currency, ignoring any formatter defined in the context.
func LCD ¶ added in v0.6.0
LCD localizes and amount using the formatting defined by the specified currency, and uses the disembiguate symbol.
func LocalizeCurrency ¶ added in v0.11.0
func LocalizeCurrency(_ context.Context, a num.Amount, cur currency.Code, opts ...currency.FormatOption) string
LocalizeCurrency will produce a localized string representation of the given amount for the provided currency.
func LocalizeMoney ¶ added in v0.11.0
LocalizeMoney will localise a monetary amount using the context's currency and formatter.
Types ¶
This section is empty.