How to output all values from a translated list?


I’ve got an array of words in my translation file but I want to display all the values on the page not just one. How do I write the for loop in twig?

    wordlist: [January, February, March, April, May, June, July, August, September, October, November, December]

I want all the months to output so I tried things like

{% for word in homepage.wordlist[grav.language.getLanguage] %}

but get nothing back. Any idea what the syntax is?


Try reading at this section: (3d or 4th one is what you need, I think :slight_smile: )


Yes I can pull out individual values but how do I get all months returned not just one specific one?
{{ ta('MONTHS_OF_THE_YEAR',3) }} is fine for March but I’m stumped getting them all.