Lang functions
Use these functions to adapt your site to meet language and regional requirements.
Use these functions to adapt your site to meet language and regional requirements.
lang.FormatAccounting PRECISION CURRENCY NUMBER ⟼ stringReturns a currency representation of a number for the given currency and precision for the current language and region in accounting notation. Read More »
lang.FormatCurrency PRECISION CURRENCY NUMBER ⟼ stringReturns a currency representation of a number for the given currency and precision for the current language and region. Read More »
lang.FormatNumber PRECISION NUMBER ⟼ stringReturns a numeric representation of a number with the given precision for the current language and region. Read More »
lang.FormatNumberCustom PRECISION NUMBER [OPTIONS...] ⟼ stringReturns a numeric representation of a number with the given precision using negative, decimal, and grouping options. Read More »
lang.FormatPercent PRECISION NUMBER ⟼ stringReturns a percentage representation of a number with the given precision for the current language and region. Read More »
lang.Merge FROM TO ⟼ anyMerge missing translations from other languages. Read More »
lang.Translate KEY [CONTEXT] ⟼ stringTranslates a string using the translation tables in the i18n directory. Read More »