少于1分钟
将以下英文翻译为中文:
https://gohugo.io/functions/lang/
FormatAccounting returns the currency representation of number for the given currency and precision for the current language in accounting notation.
The return value is formatted with at least two decimal places.
lang.FormatAccounting PRECISION, CURRENCY, NUMBER
|
|
FormatCurrency returns the currency representation of number for the given currency and precision for the current language.
The return value is formatted with at least two decimal places.
lang.FormatCurrency PRECISION, CURRENCY, NUMBER
|
|
FormatNumber formats number with the given precision for the current language.
lang.FormatNumber PRECISION, NUMBER
|
|
FormatNumberCustom formats a number with the given precision using the negative, decimal, and grouping options. The options
parameter is a string consisting of <negative> <decimal> <grouping>
. The default options
value is - . ,
.
Note that numbers are rounded up at 5 or greater. So, with precision set to 0, 1.5 becomes 2
, and 1.4 becomes 1
.
For a simpler function that adapts to the current language, see FormatNumber.
lang.FormatNumberCustom PRECISION, NUMBER, OPTIONS
|
|
FormatPercent formats number with the given precision for the current language. Note that the number is assumed to be a percentage.
lang.FormatPercent PRECISION, NUMBER
|
|
Translate returns a translated string for id.
lang.Translate ID, ARGS
i18n, T