lang.FormatNumber
Returns a numeric representation of a number with the given precision for the current language and region.
Syntax
lang.FormatNumber PRECISION NUMBER
Returns
string
{{ 512.5032 | lang.FormatNumber 2 }} → 512.50Localization of dates, currencies, numbers, and percentages is performed by the gohugoio/locales package. The language tag of the current site must match one of the listed locales.
Last updated:
April 10, 2025
:
Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)
Improve this page