Hello,
I am using YAML instead of TOML. Here is the small code of a file called en.yaml:
- id: footer_copyright
translation: "© 2019-{{ .now.Year }} Suru++ Folders by Gustavo Costa and Andrea Bonanni. All Rights Reserved."
And in a HTML file:
<p>{{ T "footer_copyright" }}</p>
I also tried all the codes with How do I display the current year?, but no luck.
sephore
2
Try:
- id: footer_copyright
translation: "© 2019-{{ .currentYear }} Suru++ Folders by Gustavo Costa and Andrea Bonanni. All Rights Reserved."
<p>{{ T "footer_copyright" (dict "currentYear" now.Year) }}</p>
Also, read: Query a flexible translation with variables and now.
That documentation got me confused. Thank you for clearing my confusion!