Localization content by multiple countries

Hello!

I’m close to having some very simple localisation code on my site, but the third condition is not executing.

Can you help me realise how I need to change this code to work?

I’m using it in a custom liquid field on the product page.

Thank you!

{% if localization.country.iso_code == ‘AU’ %}

$9.95 Discount on two pack.
Shipping from Adelaide or Sydney.

{% else if localization.country.iso_code == ‘US’ %}

Discount on two pack.
Ships from the USA.

{% else if localization.country.iso_code == ‘NZ’, ‘CA’ %}

Discount on two pack.

{% endif %}

Hello @MCtrooper , try using elsif no space no e

This wont work as the comma does nothing

{% else if localization.country.iso_code == 'NZ', 'CA' %}

For situations like this use a case statement instead

https://shopify.dev/api/liquid/tags/control-flow-tags#case-when

{% case localization.country_iso_code %}
 {% when "AU" %}
 {% when "US" %}
 {% when "NZ" %}
 {% when "CA" %}
{% endcase %}

Amazing! Thank you. :grinning_face_with_smiling_eyes: