i18n
Translation are .yml files, containing nested structures. Path masks are
defined in application's bundle.yml configs.
All files are joined together and "flattened":
- translation keys are combined as: "path.to.folder." + "nested.key.name"
- if value string starts with
md:, it's processed with markdowm:foo: "md: that's a [link](/foo/bar).
- if any key in
.ymlfile prefixed with=, content is considered as object, not as string:=foo: [ 'bar, baz' ].
Phrases are processed with babelfish.
Helpers
Translations
env.t()andself.t()(in templates) accept relative paths (relative to current folder.- if you need "absolute" name - add
@to start:env.t('@foo.bar', params)
- to make relative paths work in templates, render subtemplates only with
self.partial()helper.
Dates
Templates have self.date(time, formatName) helper, which supports localized
time in different formats. Currently configured formats are:
date,time,datetime,compact,relative. See definition.- By default 'relative' format will be used.
- For available "subintervals" for relative time configuration see DateFormatter src.