mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-12 11:04:53 -04:00
Use "map" instead of "dictionary"
This commit is contained in:
parent
704dd5da68
commit
cacd0e461d
@ -390,7 +390,7 @@ This article has 101 words.
|
||||
|
||||
### Query a singular/plural translation
|
||||
|
||||
In other to meet singular/plural requirement, you must pass a dictionary (map) with a numeric `.Count` property to the `i18n` function. The below example uses `.ReadingTime` variable which has a built-in `.Count` property.
|
||||
To enable pluralization when translating, pass a map with a numeric `.Count` property to the `i18n` function. The example below uses `.ReadingTime` variable which has a built-in `.Count` property.
|
||||
|
||||
```go-html-template
|
||||
{{ i18n "readingTime" .ReadingTime }}
|
||||
|
@ -1,11 +1,11 @@
|
||||
---
|
||||
title: dict
|
||||
description: Creates a dictionary from a list of key and value pairs.
|
||||
description: Creates a map from a list of key and value pairs.
|
||||
categories: [functions]
|
||||
menu:
|
||||
docs:
|
||||
parent: functions
|
||||
keywords: [dictionary]
|
||||
keywords: [collections]
|
||||
signature: ["dict KEY VALUE [KEY VALUE]..."]
|
||||
relatedfuncs: []
|
||||
---
|
||||
|
@ -6,7 +6,7 @@ menu:
|
||||
docs:
|
||||
parent: functions
|
||||
keywords: []
|
||||
signature: ["echoParam DICTIONARY KEY"]
|
||||
signature: ["echoParam MAP KEY"]
|
||||
relatedfuncs: []
|
||||
---
|
||||
|
||||
|
@ -39,7 +39,7 @@ The above will overlay `$logo` in the upper left corner of `$img` (at position `
|
||||
Using the `Text` filter, you can add text to an image.
|
||||
|
||||
{{% funcsig %}}
|
||||
images.Text TEXT DICT)
|
||||
images.Text TEXT MAP)
|
||||
{{% /funcsig %}}
|
||||
|
||||
The following example will add the text `Hugo rocks!` to the image with the specified color, size and position.
|
||||
|
@ -10,9 +10,7 @@ signature: ["jsonify INPUT", "jsonify OPTIONS INPUT"]
|
||||
relatedfuncs: [plainify]
|
||||
---
|
||||
|
||||
Jsonify encodes a given object to JSON.
|
||||
|
||||
To customize the printing of the JSON, pass a dictionary of options as the first
|
||||
To customize the printing of the JSON, pass a map of options as the first
|
||||
argument. Supported options are "prefix" and "indent". Each JSON element in
|
||||
the output will begin on a new line beginning with *prefix* followed by one or
|
||||
more copies of *indent* according to the indentation nesting.
|
||||
|
@ -5,7 +5,7 @@ categories: [functions]
|
||||
menu:
|
||||
docs:
|
||||
parent: functions
|
||||
keywords: [dictionary]
|
||||
keywords: [collections]
|
||||
signature: ["collections.Merge MAP MAP...", "merge MAP MAP..."]
|
||||
relatedfuncs: [dict, append, reflect.IsMap, reflect.IsSlice]
|
||||
---
|
||||
|
Loading…
x
Reference in New Issue
Block a user