jekyll-multiple-languages-plugin icon indicating copy to clipboard operation
jekyll-multiple-languages-plugin copied to clipboard

Check if translation exists without a warning

Open kleuter opened this issue 7 years ago • 2 comments

I'd love to have an ability to check if a translated string exists, without a warning when building website (i have hundreds of them when using include file).

Example:

  {% if page.title %}
  {% capture page_title %}{% t page.title %}{% endcapture %}
  {% endif %}

  {% if page_title == '' %}
  {% assign page_title = page.title %}
  {% endif %}

kleuter avatar Nov 27 '16 18:11 kleuter

how to do that with a drop-down language selector?

BenjaminHoegh avatar Apr 16 '18 12:04 BenjaminHoegh

Currently this kind of check doesn't work. Instead, it throws an error. Is there a correct way to check if translated string exists?

george-gca avatar Sep 30 '22 18:09 george-gca