kurtsson / jekyll-multiple-languages-plugin

I18n support for Jekyll and Octopress
MIT License
925 stars 202 forks source link

Check if translation exists without a warning #82

Open kleuter opened 7 years ago

kleuter commented 7 years ago

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 %}
BenjaminHoegh commented 6 years ago

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

george-gca commented 1 year ago

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