Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
crownedgrouse committed Mar 25, 2023
1 parent c89ec44 commit 3d39cd0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion manual/templates-go.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Assists in constructing a HTML checkbox `input` element, eg:

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

`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.
`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.
In last resort, internationalisation will apply on timeago english term, and missing translation will be displayed with `i18n.unknown_format` config value.

The example below assumes `dateArg := time.Now()`:
Expand All @@ -110,6 +110,7 @@ The example below assumes `dateArg := time.Now()`:
{{datetime .MyDateTime}}
{{timeago .MyDateTime}}
{{timeago .MyDateTime "fr"}}
{{timeago .MyDateTime .lang}}
{% endraw %}{% endcapture %}
{% highlight htmldjango %}{{ex}}{% endhighlight %}

Expand Down

0 comments on commit 3d39cd0

Please sign in to comment.