<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Lang functions on Hugo</title><link>https://v0-122-0--gohugoio.netlify.app/functions/lang/</link><description>Recent content in Lang functions on Hugo</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://v0-122-0--gohugoio.netlify.app/functions/lang/index.xml" rel="self" type="application/rss+xml"/><item><title>lang.FormatAccounting</title><link>https://v0-122-0--gohugoio.netlify.app/functions/lang/formataccounting/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/functions/lang/formataccounting/</guid><description>{{ 512.5032 | lang.FormatAccounting 2 &amp;#34;NOK&amp;#34; }} → NOK512.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.</description></item><item><title>lang.FormatCurrency</title><link>https://v0-122-0--gohugoio.netlify.app/functions/lang/formatcurrency/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/functions/lang/formatcurrency/</guid><description>{{ 512.5032 | lang.FormatCurrency 2 &amp;#34;USD&amp;#34; }} → $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.</description></item><item><title>lang.FormatNumber</title><link>https://v0-122-0--gohugoio.netlify.app/functions/lang/formatnumber/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/functions/lang/formatnumber/</guid><description>{{ 512.5032 | lang.FormatNumber 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.</description></item><item><title>lang.FormatNumberCustom</title><link>https://v0-122-0--gohugoio.netlify.app/functions/lang/formatnumbercustom/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/functions/lang/formatnumbercustom/</guid><description>This function formats a number with the given precision. The first options parameter is a space-delimited string of characters to represent negativity, the decimal point, and grouping. The default value is - . ,. The second options parameter defines an alternate delimiting character.
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 lang.</description></item><item><title>lang.FormatPercent</title><link>https://v0-122-0--gohugoio.netlify.app/functions/lang/formatpercent/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/functions/lang/formatpercent/</guid><description>{{ 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.</description></item><item><title>lang.Merge</title><link>https://v0-122-0--gohugoio.netlify.app/functions/lang/merge/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/functions/lang/merge/</guid><description>As an example:
{{ $pages := .Site.RegularPages | lang.Merge $frSite.RegularPages | lang.Merge $enSite.RegularPages }} Will &amp;ldquo;fill in the gaps&amp;rdquo; in the current site with, from left to right, content from the French site, and lastly the English.
A more practical example is to fill in the missing translations from the other languages:
{{ $pages := .Site.RegularPages }} {{ range .Site.Home.Translations }} {{ $pages = $pages | lang.Merge .Site.RegularPages }} {{ end }}</description></item><item><title>lang.Translate</title><link>https://v0-122-0--gohugoio.netlify.app/functions/lang/translate/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/functions/lang/translate/</guid><description>The lang.Translate function returns the value associated with given key as defined in the translation table for the current language.
If the key is not found in the translation table for the current language, the lang.Translate function falls back to the translation table for the defaultContentLanguage.
If the key is not found in the translation table for the defaultContentLanguage, the lang.Translate function returns an empty string.
To list missing and fallback translations, use the --printI18nWarnings flag when building your site.</description></item></channel></rss>