Closed leobalter closed 8 years ago
Hi @leobalter,
currently you can use the following code to do what you want:
{% for lang in site.languages %}
{% capture about_link %} about {{ lang }} {% endcapture %}
<pre>{% tl {{ about_link }} %}</pre>
{% endfor %}
I will make a small update on the code to allow expansions on the tags, so the following could be used:
{% for lang in site.languages %}
<p>{% tl about {{ lang }} %}</p>
{% endfor %}
I will work on it right now, so when I finish it, I will let you know.
Thank you, @Anthony-Gaudino! I'm looking forward this update.
@leobalter, GEM version 1.5.0 was released and you should be able to use the shorter version of the code now.
I would like to find the other available links for the current page I'm in. I'm not sure how I do it. I tried something like:
But this ends up applying
lang
as a string, and not passing lang as the variable name.This might be more like a Liquid issue, but what I really need here is to find the links for the other locale versions of my current page.
There might be a way to solve this writing a custom plugin extending
translate-link
, but I first want to confirm there's nothing more simple through the template api.Thanks for this great tool, all the other parts are working very well the documentation is very helpful.