Closed buraktamturk closed 8 years ago
Hi @buraktamturk, sorry for taking so long to answer you.
I released version 1.4.2 with a small patch that allows you to access the site.translations
hash. This way you can use it in a Liquid for loop like this:
{% for item in site.translations[site.lang]["my_nested_yaml_collection"] %}
<p>{{ item[0] }} -> {{ item[1] }}</p>
{% endfor %}
For the following YAML:
symbols:
-
title: First
message: Message
-
title: Second
message: Message
The following code should work:
{% for item in site.translations[site.lang]["symbols"] %}
<li>
<h2>{{ item["title"] }}</h2>
<p>{{ item["message" }}</p>
</li>
{% endfor %}
If you find any trouble please feel free to comment bellow.
Hello, thanks for the work! I think it'll fit perfectly to my use case, and I'll test whenever possible soon.
Hello,
I can't use the translate tag with for loops. Is it supported?
my en.yml file