diff --git a/manual/templates-go.md b/manual/templates-go.md index 5c7d1b5..4b00404 100644 --- a/manual/templates-go.md +++ b/manual/templates-go.md @@ -100,11 +100,17 @@ 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, 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()`: {% capture ex %}{% raw %} {{date .MyDate}} {{datetime .MyDateTime}} +{{timeago .MyDateTime}} +{{timeago .MyDateTime "fr"}} +{{timeago .MyDateTime .lang}} {% endraw %}{% endcapture %} {% highlight htmldjango %}{{ex}}{% endhighlight %} diff --git a/tutorial/gettingstarted.md b/tutorial/gettingstarted.md index 083abb8..d1ff5e9 100644 --- a/tutorial/gettingstarted.md +++ b/tutorial/gettingstarted.md @@ -36,7 +36,7 @@ Git and Mercurial are required to allow `go get` to clone various dependencies. To get the Revel framework, run - go get github.com/revel/revel + go install github.com/revel/cmd/revel@latest This command does a couple of things: