Unlost Labs

Guide

How to translate hard-coded text in your Shopify theme

Everything is translated. You switch to German to admire your work, and there it is: a line under the buy button, still in your own language. Nine times out of ten, that’s hard-coded text.

What “hard-coded” actually means

A Shopify theme keeps most of its words in two places that can be translated: its language files, which hold things like button labels and cart texts, and the settings you fill in in the theme editor, like headings and section texts. Translate & Adapt and most translation apps work with those two.

Hard-coded text lives somewhere else: written straight into the code. A Custom Liquid block, a custom section a developer built, a snippet with a shipping promise in it. On the storefront it looks like any other sentence. To Shopify it’s code, so it never appears in Translate & Adapt, and most apps never see it either.

How to track it down

Open your store in one of your other languages and read it like a customer would. Anything still in your own language is a suspect. Then open the theme editor on that page and click the section: if it’s a Custom Liquid block, or a custom section without text fields to fill in, you’ve found your hard-coded text.

The usual hiding places are the little trust or shipping lines under the add-to-cart button, announcement bars someone added in code, size-guide popups and custom footer text.

Fix one: move it into the language file

A developer can replace the text with a translation key, something like {{ 'products.shipping_note' | t }}, and put the actual sentence in the theme’s language file. From then on it behaves like any theme text and shows up in Translate & Adapt. It’s the cleanest fix, but it needs someone who’s comfortable in theme code, and it has to be done again for every new custom text you add.

Fix two: let an app translate it

This was one of the reasons I built Unlost. Text written directly into the theme’s code gets translated too, and you don’t change a line of code: turn on the Unlost app embed in your theme and shoppers see that text in their own language. It’s translated along with the rest of your store and kept up to date when you change it.

Before anyone touches the code

Duplicate your theme first, always. And keep a short note of where your custom texts live, so you know what to check after the next theme update.

Questions

Why doesn't Translate & Adapt show my Custom Liquid text?

Because Shopify treats text inside a Custom Liquid block or custom code as part of the code, not as translatable content. Only theme language files and theme settings are offered for translation.

Can I translate a Custom Liquid block without coding?

Yes, with an app that handles hard-coded text. Unlost translates it once its app embed is turned on in your theme.

Will a theme update undo the translation?

If a developer moved the text into a language file, a theme update can overwrite that file. Check your custom texts after updating.

Try Unlost on your store

Free for one language and up to 50 products. Paid plans keep every language up to date within a minute of a change.

Install from the Shopify App Store

Read next