> For the complete documentation index, see [llms.txt](https://help.pagefly.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.pagefly.io/pagefly-help-center-japanese/faqtotoraburushtingu/troubleshooting/live-site-issue/cant-create-locales-file.md).

# ロケールファイルを作成できない

### 概要

この記事では、[Shopifyでロケールファイルの更新に失敗したという問題を修正する方法](https://help.pagefly.io/manual/cant-create-locales-file/)を学びます。

このエラーが発生する理由は、PageFlyがShopifyテーマのlocalesフォルダ内にロケールファイルを作成できないためです。

### ロケールファイルを作成できない問題を修正する方法

* **ステップ1: Shopifyテーマにアクセスする**

Shopifyストアにログイン後、下の画像に示すように、オンラインストア > テーマ > 3点リーダー > コードを編集と進みます。

![](/files/jO9KefTkWpN2Hi3bsjS1)

* **ステップ2: 新しいコードを追加する**

テーマセクションで、下にスクロールしてLocales部分を確認し、**{/} en.default.json** オプションを選択します。

![](/files/QEavxyhumS47sIMxsyFo)

このオプションを選択したら、このファイルの最後の行までスクロールすると、下の画像のような現在の状況が表示されます。

![](/files/4ZEWrl3HuN2eGeEbe5QS)

次に、このエラーを修正するために、コードの一部を追加する必要があります。コード部分は "}" の後に配置する必要があります。

必要なコード部分は以下の通りです。

<https://pastebin.com/raw/sV58eF1N>

* **ステップ3: 保存をクリックする**

![](/files/kmE0DHD9VJla3VYcYUOn)

### よくある質問

#### ロケールファイルとは何ですか？

ロケールファイルは、テーマ全体およびテーマエディターで使用されるテキスト文字列の翻訳セットを含むJSONファイルです。詳細については、この[記事](https://shopify.dev/docs/themes/architecture/locales)を参照してください。

#### ロケールファイルはどこで見つけられますか？

ロケールファイルは、テーマのlocalesディレクトリにあります。

└── theme

...

└── locales

#### この解決策はどのShopifyテーマでも機能しますか？

テーマ固有: この解決策は、現在使用しているテーマ向けです。他のテーマで問題が発生した場合は、同様の手順が適用される可能性がありますが、コードは異なる場合があります。変更を行う前に、必ずテーマのバックアップを取ってください。

### 追加リソース

* [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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/pagefly-help-center-japanese/faqtotoraburushtingu/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.
