Limitations for the theme settings locale

I’m encountered an error when trying to save en.default.schema.json:
Failed to upload file “locales/en.default.schema.json” to remote theme.
Too many translation keys.

Is there really a limitation to the translation key count in this file, or to the line count?

(Our file is 6033 lines, when we decrease it by 50, there’s no error.)

Hey @Ann_Ashen

Yes, there is currently a limit on translation keys for locale files. The limit is a maximum of 3400 translations in a single locale file, and each translation value can’t exceed 1000 characters.

What’s likely happening when you remove 50 lines is that dropped the total keys below that 3400 translation limit, which is why it started working.

You can find the full requirements and limitations for locale files in our documentation:

Hello, we are working on a translation app and we keep seeing this error in many stores we test one, specially from the Theme resource. But there are other translation apps out there which are able to translate these large theme so there must be a way?

We have cleaned the locale file the best we can, but for some theme there is just so many elements. So what is the common way in this scenario? Is there any other way of storing? We thought about storing it outside or in Json but the problem is the Liquid variables so we seems we can’t do that.

Any ideas at all? Would be highly appreciated! Thank you

Hey @Joao_Lourenco

Those apps are not doing it through the locales. They simply use JavaScript to replace the initially loaded content with translated content.