Can’t create locales file

OverviewClick to copy

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?Click to copy

  • Step 1: Access Your Shopify ThemeClick to copy

After logging into your Shopify store, go to Online Store > Themes > 3 dots > Edit code as shown in the image below.

  • Step 2: Add new codeClick to copy

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

  • Step 3: Click SaveClick to copy

Frequently Asked QuestionsClick to copy

What Is A Locale File?Click to copy

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?Click to copy

Locale files are located in the locales directory of the theme:

└── theme

└── locales

Will This Solution Work For Any Shopify Theme?Click to copy

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.

Additional ResourcesClick to copy

Thank you for your feedback!

Navigate this category

PreviousPrevious article

Could not find the answer
to your question?

Chat with us
Great news! PageFly Help Center is now available in Japanese 🇯🇵. Explore now by switching the language in the Header section ☝️