# Theme locale files overview

> How locale files store translation strings for a Shoplazza Theme, where they live in the theme, and how merchants edit them in the Shoplazza language editor.

Locale files are JSON files that contain a set of translations for text strings used throughout the theme.

In addition to giving merchants a single place to easily edit words and phrases that are repeated throughout the theme, locale files allow you to translate storefront content to multiple languages for international merchants and customers.

## Location

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

```text title="Directory"
└── theme
    ...
    └── locales
```

## Subtypes

There is one type of locale file:

| Type                                        | Description                                                                                                                                                                                                                     |
| :------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Storefront](./storefront-locale-files) | Storefront locale files have a `.json` file extension, and control translations for storefront content. These translations can be edited by merchants through the [Shoplazza Language Editor](https://sso.shoplazza.com/login). |

## Schema

Locale files need to follow a specific naming structure. They also follow a basic organizational structure:

* **Category**: The top-level category of your translations.
* **Group**: The second level grouping of translations within a category.
* **Description**: The third level, represents the individual translations.

```json title="Example"
{
  "my_category": {
    "my_group": {
      "my_description": "translation text",
      ...
    },
    ...
  },
  ...
}
```

### Name locale files

Locale file naming must follow the standard [IOS language code nomenclature](http://www.lingoes.net/en/translator/langcode.htm), where the first lowercase letter code represents the language, and the second uppercase letter code represents the region.

For example:

| Language                | Storefront   |
| :---------------------- | :----------- |
| Arabic - Saudi Arabia   | `ar-SA.json` |
| German - Germany        | `de-DE.json` |
| English - United States | `en-US.json` |

## Usage

When working with locale files, you should familiarize yourself with referencing locale files. The code for referencing locale files varies depending on whether you're referencing a [storefront locale file](./storefront-locale-files).
