{% set priceInfoStr = '' %}
{% if type is same as "PerPerson" and nights == 1 %}
{% set priceInfoStr = 'demi.detail.priceinfo.per-person-per-night' | trans %}
{% elseif type is same as "PerPerson" and nights > 1 %}
{% set priceInfoStr = 'demi.detail.priceinfo.per-person-per-x-nights' | trans %}
{% set priceInfoStr = priceInfoStr | replace({"[NIGHTS]" : nights})%}
{% elseif type is same as "PerUnit" and nights == 1 %}
{% set priceInfoStr = 'demi.detail.priceinfo.per-unit-per-night' | trans %}
{% elseif type is same as "PerUnit" and nights > 1 %}
{% set priceInfoStr = 'demi.detail.priceinfo.per-unit-per-x-nights' | trans %}
{% set priceInfoStr = priceInfoStr | replace({"[NIGHTS]" : nights})%}
{% elseif type is same as "PerPerson" %}
{% set priceInfoStr = 'demi.detail.priceinfo.per-person' | trans %}
{% elseif type is same as "PerUnit" %}
{% set priceInfoStr = 'demi.detail.priceinfo.per-unit' | trans %}
{% elseif type is same as "Total" %}
{% set priceInfoStr = 'demi.detail.priceinfo.total' | trans %}
{% endif %}
{{ priceInfoStr }}