Skip to content

Commit 3d39cd0

Browse files
committed
fix
1 parent c89ec44 commit 3d39cd0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

manual/templates-go.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Assists in constructing a HTML checkbox `input` element, eg:
100100

101101
Format a date according to the application's default [date](appconf.html#formatdate) and [datetime](appconf.html#formatdatetime) format.
102102

103-
`timeago` accept a second argument (ISO 639-1) as language to be used, otherwise use `i18n.default_language` config value, for preconfigured language : de, fr, ko, pt, sp, tr, zh and default en.
103+
`timeago` accept a second argument, either string or variable set in `ViewArgs` telling (ISO 639-1 code) as language to be used, otherwise use `i18n.default_language` config value, for preconfigured language : de, fr, ko, pt, sp, tr, zh and default en.
104104
In last resort, internationalisation will apply on timeago english term, and missing translation will be displayed with `i18n.unknown_format` config value.
105105

106106
The example below assumes `dateArg := time.Now()`:
@@ -110,6 +110,7 @@ The example below assumes `dateArg := time.Now()`:
110110
{{datetime .MyDateTime}}
111111
{{timeago .MyDateTime}}
112112
{{timeago .MyDateTime "fr"}}
113+
{{timeago .MyDateTime .lang}}
113114
{% endraw %}{% endcapture %}
114115
{% highlight htmldjango %}{{ex}}{% endhighlight %}
115116

0 commit comments

Comments
 (0)