Overview
In this article, you will learn how to fix the issue “Failed to update a locale file at Shopify.”
The reason for this error happening is that PageFly can’t create locale files inside the locales folder of the Shopify theme.
How To Fix Can’t Create Locales File Issue?
After logging into your Shopify store, go to Online Store > Themes > 3 dots > Edit code as shown in the image below.
In the Themes section, scroll down to see the Locales part and choose the {/} en.default.json option.
After choosing this option, then you scroll down to the last line of this file, you can see the current situation as in the image below.
Now, to fix this error, you need to add a code part. The code part needs to be put after the “}”
Here is the code part needed:
https://pastebin.com/raw/sV58eF1N
Frequently Asked Questions
What Is A Locale File?
Locale files are JSON files that contain a set of translations for text strings used throughout the theme and theme editor. For more information, please refer to this article.
Where Can I Find Locale Files?
Locale files are located in the locales directory of the theme:
└── theme
…
└── locales
Will This Solution Work For Any Shopify Theme?
Theme Specific: The solution is intended for the theme you are currently using. If you encounter issues with other themes, similar steps may apply, but the code might differ. Always backup your theme before making changes.