# Language Files (Locales)

### **What You’ll Learn**

* What locale files are and where they live in your theme
* How to customize text labels throughout your storefront
* How to add new languages and manage translations

***

### 🧩 What Are Locale Files?

Locale files control all the translatable text in your Shopify theme. These are stored as `.json` files inside your theme's `locales` folder. Each file represents one language (e.g., `en.default.json` for English).

You’ll see translations for things like:

* Button labels (e.g., “Add to Cart”)
* Section headings
* System messages (e.g., “No products found”)

***

### 📁 File Location in Your Theme

```plaintext
plain-jane-theme
  └── locales
        ├── en.default.json
        ├── fr.default.json
        └── es.default.json
```

Each file contains a set of **key-value pairs**, where the key is the identifier and the value is the translatable text.

Example:

```json
"products": {
  "product": {
    "add_to_cart": "Add to Cart"
  }
}
```

***

### ✏️ How to Edit Text Labels

1. From your **Shopify Admin**, go to **Online Store > Themes**
2. Click **Customize** next to your current theme
3. In the theme editor, click the **three-dot menu (⋯)** > **Edit default theme content**
4. Use the search bar to find any text you want to update (e.g., “Sold Out”)
5. Change the value and click **Save**

> 💡 This is the easiest way to rename buttons like “Buy Now” or “Learn More” without touching code.

***

### 🌍 Adding or Managing Multiple Languages

To offer your store in more than one language:

1. Go to **Settings > Languages** in your admin
2. Add the languages you want to support
3. Shopify will automatically generate the new `.json` locale files in your theme
4. You can then translate content using:
   * Shopify’s admin UI
   * Translation apps (like Weglot or Langify)
   * Manually editing the `.json` files (developer-level)

> ⚠️ Be sure to update metafields and custom content for each language too if you're using those.

***

### 🧠 Developer Notes

You can access locale strings in Liquid using the `t` filter:

```liquid
{{ 'products.product.add_to_cart' | t }}
```

If you’re building or extending a theme, structure your locale keys by section or context (e.g., `header`, `footer`, `cart`, etc.) to keep things organized.

### **Need Help?**

* 💬 **Join our community on Discord:** <https://discord.gg/hcc2GvgZc6>
* 📧 **Email us at:** <support@openspaces.design>
* 💻 **Live chat with us:** Available Monday–Friday, 10AM–6PM EST, directly on our website


---

# 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://docs.openspaces.design/readme-1/theme-settings/languages-and-seo/language-files-locales.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.
