> 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点リーダー > コードを編集と進みます。

![](https://2271939490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9kr2rEW4UEj3nmGvBuq%2Fuploads%2Fgit-blob-43abdb77aa18e600c00136df6dd5926212ceebe2%2Fimage1-5.png?alt=media)

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

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

![](https://2271939490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9kr2rEW4UEj3nmGvBuq%2Fuploads%2Fgit-blob-b095fa572a29588c241cbaae8c4d00f69fa9e9d1%2Fimage2-3.png?alt=media)

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

![](https://2271939490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9kr2rEW4UEj3nmGvBuq%2Fuploads%2Fgit-blob-24cce81cad5c7b933e890c1ba7f56b4bd1d2896e%2Fimage3-2.png?alt=media)

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

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

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

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

![](https://2271939490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9kr2rEW4UEj3nmGvBuq%2Fuploads%2Fgit-blob-c97337d5f358657aedf2f08a4e55d0bff422d914%2Fimage4-4.png?alt=media)

### よくある質問

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

ロケールファイルは、テーマ全体およびテーマエディターで使用されるテキスト文字列の翻訳セットを含む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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.pagefly.io/pagefly-help-center-japanese/faqtotoraburushtingu/troubleshooting/live-site-issue/cant-create-locales-file.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
