Tool

Shopify Theme Locale JSON Validator

Check en.default.json against a translated locale. Catch translated Liquid tokens, broken _html keys, missing keys, and pluralization errors in the browser.

100% client-side: Your files never leave your browser.

0 B
0 B
Paste a Shopify locale JSON file, or load the broken Dawn sample.
Reference

Why Shopify Theme Locale JSON Uploads Fail

Shopify Online Store 2.0 themes store copy in locales/en.default.json and one file per language, such as locales/de.json. Machine translation often breaks quotes, Liquid names, HTML keys, nested keys, or pluralization.

Dawn starts en.default.json with a block comment. The comment is not JSON, so JSON.parse fails on line 1. A value such as "note": "keep /* this */ text" must stay intact.

Liquid tokens are machine names. {{ count }} rewritten as {{ anzahl }} leaves the cart drawer blank, because the theme still passes count.

Shopify Theme Locale Rules Cheat Sheet

RuleValid ExampleWhat Breaks in Shopify
Block comments /* */A leading /* ... */ comment outside strings. A value may contain /* keep */.An unclosed comment, or JSON.parse on the raw Dawn file.
Liquid {{ interpolations }}{{ count }} kept. {{ amount }} and {{ count }} may swap order.{{ count }} changed to {{ anzahl }}. The cart drawer is empty.
*_html suffixterms_html with a closed <a href="{{ url }}">link</a>.That anchor in shipping_note, or an unclosed <a> in terms_html.
Pluralization one / otheritem_count.one and item_count.other. Add few only when needed.The object flattened to a string, or one renamed.
JSON escapingStraight double quotes. Escape an inner quote with a backslash.Smart quotes or a trailing comma. The file fails to parse.

Why Shopify Only Renders HTML in *_html Keys

Shopify treats a locale value as plain text unless the key ends with _html:

shipping_note: <strong>Free</strong> shipping
shipping_note_html: <strong>Free</strong> shipping

The first line shows the brackets, because shipping_note does not end in _html. The second line renders bold. An unclosed <a> in terms_html can swallow the cart footer. br, hr, and img need no closer.

Polish, Russian, and Arabic may add few, many, or zero beside one and other. Renaming one, or collapsing the object into a string, is not valid.

FAQ

Why do Shopify Dawn locale files have a block comment at the top?

Dawn writes a warning inside /* */ at the top of en.default.json. The comment is not JSON. Strip block comments outside strings, then parse the object. A slash-star pair inside a quoted value stays in the string.

How do pluralization keys work for Polish, Russian, and Arabic?

Shopify uses CLDR categories. English needs one and other. Polish and Russian often need few and many. Arabic can also need zero and two. An extra few key can be valid. Renaming one, or flattening the object, breaks the cart count.

Why does translating {{ count }} break the cart drawer?

The cart passes the quantity as count. A translated name such as anzahl never receives it, so the drawer is empty. Reordering {{ amount }} and {{ count }} is safe. Replacing a name is not.

Does this validator upload locale files?

No. The check runs in the browser. Pasted JSON and dropped files stay on the machine and are not sent to an API.

What should be fixed before a theme locale is uploaded?

Fix invalid JSON first, then missing key paths, then Liquid tokens and _html tags. Extra CLDR keys and long untranslated sentences are warnings. Raw HTML still shows when a tag sits in a key that does not end with _html.

Check a spreadsheet with the Shopify Translate & Adapt CSV HTML Validator. Merge tags in email belong in Email Tag Guard. See extracting translatable strings and the layout checklist. Static pages can be translated on HTML Translate. The tools hub lists every browser check.