Hi, I’m having an issue with my Shopify theme locale file.
My en.default.json file validates correctly and only has 502 keys.
However, my lv.json file also validates correctly as JSON, but it has around 3,400 translatable value keys. Shopify support suggested that the issue is likely caused by lv.json hitting the 3,400 key limit.
There are no missing commas, broken brackets, or invalid JSON syntax. The file parses correctly.
What is the correct way to fix this? Should I remove unused checkout translation keys from lv.json, split the locale somehow, or is there another recommended Shopify approach?
Thanks for the reply, but unfortunately this is not safe when applied to the entire file.
We already compared en.default.json with lv.json. For normal theme namespaces such as general, product, cart, collection, search, etc., your approach is correct: the English default file defines the canonical key structure, and extra Latvian keys can be removed.
However, almost all of the excess keys are inside the reserved shopify.checkout and customer_accounts namespaces. These namespaces do not have the same structure in en.default.json. The English file contains only a small number of checkout overrides, while the Latvian file contains the much larger schema generated through Shopify’s language editor.
We tested deleting keys from those namespaces simply because they were absent from en.default.json, and it removed checkout translations that were still being used. Therefore, the fact that a checkout key is missing from en.default.json does not mean that it is unused or safe to delete from lv.json.
So the comparison is safe only when shopify and customer_accounts are explicitly excluded. Unfortunately, that does not solve the original problem, because approximately 2,118 keys are inside shopify.checkout, and there is no documented way to determine which of them are obsolete and which are currently active.
We agree that splitting the file is not supported. What we need is either:
an official list of the currently valid checkout keys;
a safe way to reset or remove obsolete checkout overrides;
or confirmation from Shopify regarding which specific keys can be deleted.
Until then, deleting every key that does not exist in en.default.json risks breaking live checkout translations, so this should not be considered a safe solution.
For actual development issues use the ACTUAL development forums https://community.shopify.dev/
Location Location Location, you don’t walk into the consumer electronics store in the mall when you need the phone-repair guy down the street.
It sounds like you have reached the practical locale key limit I’d recommend reviewing lv.json and removing any unused or duplicate translation keys. Since Shopify doesn’t support splitting theme locale files, keeping the locale file as lean as possible is generally the best approach. If you’re using a translation app, it may also be worth checking whether it is adding unnecessary key.