How can I translate custom liquid section code in Shopify?

Topic summary

A French Shopify store owner needs to translate custom liquid sections to English, but Shopify’s Translate & Adapt app doesn’t support this content type.

Official Response:
Shopify staff confirmed custom liquid sections cannot be translated natively. Recommended alternatives include:

  • Using translatable theme blocks like ‘Image with Text’ or ‘Rich Text’ instead
  • Running third-party apps (Weglot, Langify, Langshop) alongside Translate & Adapt
  • Implementing translation keys manually via Shopify’s translations API

Community Solutions:

Translation Keys Method (most comprehensive):

  • Add translation keys to locale JSON files (e.g., en.default.json, fr.json)
  • Reference keys in liquid using {{ 'banner.headline' | t }}
  • Requires understanding of Shopify’s translation API and structured naming conventions

Conditional Language Check (simpler workaround):

{% if request.locale.iso_code == 'fr' %}
  french content
{% else %}
  english content
{% endif %}

Outcome:
The original poster resolved their issue using the translation keys API, though eventually switched to Weglot for additional features like app translation. Multiple community members have since requested clarification on implementing these solutions.

Summarized with AI on November 3. AI used: claude-sonnet-4-5-20250929.

Here is what I do for a custom liquid translation with a default English store. It might not be perfect but it works for me:

{% if request.locale.iso_code == ‘fr’ %}
french content
{% else %}
english content
{% endif %}

3 Likes