lang.FormatPercent
Returns a percentage representation of a number with the given precision for the current language and region.
Syntax
lang.FormatPercent PRECISION NUMBER
Returns
string
{{ 512.5032 | lang.FormatPercent 2 }} → 512.50%
Localization 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:
December 4, 2023
:
Squashed 'docs/' changes from 4d936aee6..4dd2d6415 (35dec7c96)
Improve this page