# Can't create locales file

### Overview

In this article, you will learn [how to fix the issue “Failed to update a locale file at Shopify.”](https://help.pagefly.io/manual/cant-create-locales-file/)

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?

* **Step 1: Access Your Shopify Theme**

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

![](/files/EdnsvM0YVhb15L0VYzsa)

* **Step 2: Add new code**

In the Themes section, scroll down to see the Locales part and choose the **{/} en.default.json** option.

![](/files/FjESh5iELbQxN9YI90fV)

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.

![](/files/mt8naFFdVaNWSmHyWkAJ)

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 Save**

![](/files/O2qOYw622dMRkzDQXPp5)

### 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](https://shopify.dev/docs/themes/architecture/locales).

#### 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.

### Additional Resources

* [How to Edit PageFly HTML Liquid Element?](https://help.pagefly.io/manual/html-liquid-element/)
* [Page not fully displayed in theme preview mode](https://help.pagefly.io/manual/page-not-fully-displayed-in-theme-preview-mode/)
* [Shopify Code Editor: A Higher Level of Customization](https://pagefly.io/blogs/shopify/shopify-code-editor)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.pagefly.io/faq-and-troubleshooting/troubleshooting/live-site-issue/cant-create-locales-file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
