We're building a translation architecture using Braze catalogs to serve localised email content across 30 markets. We want a universal content block where marketers simply define which keys they need for each email (subject line, preheader, header text, CTA etc.) and the block fetches and assigns the translations dynamically based on the user's locale.
Ideally we'd do something like this:
liquid
{% assign pull_keys = "welcome_subject_line,welcome_preheader,welcome_header_text,welcome_cta_1" | split: "," %}{% for key in pull_keys %} {% catalog_items email_translations {{key}} %} {% assign {{key}} = items[0][locale] | default: items[0]['en-AU'] %}{% endfor %}
So in the email body we could just reference:
liquid
{{ welcome_subject_line }}{{ welcome_preheader }}{{ welcome_header_text }}{{ welcome_cta_1 }}
But we're hitting this error:
Liquid syntax error: Syntax Error in 'assign' - Valid syntax: assign [var] = [source]
Has anyone found a workaround for this? Would love to know how other companies are handling email content translation at scale in Braze. Are you using catalogs, Connected Content or something else entirely? Any approaches or workarounds appreciated!