Home > Back-end >  Starting with Go Templates, what does the T indicate in {{T "post_nav_prev"}}
Starting with Go Templates, what does the T indicate in {{T "post_nav_prev"}}

Time:05-19

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.

CodePudding user response:

T is an alias for lang.Translate

source : https://gohugo.io/functions/lang/#langtranslate

It define here

  • Related