Skip to content

Instantly share code, notes, and snippets.

@rruhlen
Created September 19, 2013 21:56
Show Gist options
  • Select an option

  • Save rruhlen/6630423 to your computer and use it in GitHub Desktop.

Select an option

Save rruhlen/6630423 to your computer and use it in GitHub Desktop.
example of how to assign translations to a variable with liquid.
{% case system.language %}
{% when 'de' %}
{% assign customer_number_label = 'Kunden Nr.' %}
{% assign order_number_label = 'Bestell Nr.' %}
{% when 'en' %}
{% assign customer_number_label = 'Customer No.' %}
{% assign order_number_label = 'Order No.' %}
{% endcase %}
<div>
<label>{{ customer_number_label }}</label>
<input type="text" />
</div>
<div>
<label>{{ order_number_label }}</label>
<input type="text" />
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment