Starting with Go Templates, what does the T indicate in {{T "post_nav_prev"}}


Trying to understand Go templates in Hugo. I find the subject construct {{T "post_nav_prev"}}. I see post_nav_prev defined in i18n yaml file en.yaml, but can’t seem to find what T is or where it is defined. Sorry for the lack of basic knowledge. Thanks for any guidance.


T is an alias for lang.Translate

source :

It define here

Answered By – Rahmat Fathoni

Answer Checked By – Senaida (GoLangFix Volunteer)

Leave a Reply

Your email address will not be published.